fix(settings): restore budgets settings redirect (#228)

## Summary
- restore the legacy `/settings/budgets` route as a redirect to
`/budgets` so old settings links no longer trigger a missing Inertia
page
- add a feature test covering the redirect to prevent the broken route
from resurfacing

## Testing
- php artisan test --compact
tests/Feature/Settings/BudgetSettingsRedirectTest.php
This commit is contained in:
Víctor Falcón 2026-03-16 12:04:08 +00:00 committed by GitHub
parent a60fd6f452
commit e5fcaee8f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -47,6 +47,8 @@ Route::middleware('auth')->group(function () {
Route::patch('settings/labels/{label}', [LabelController::class, 'update'])->name('labels.update');
Route::delete('settings/labels/{label}', [LabelController::class, 'destroy'])->name('labels.destroy');
Route::redirect('settings/budgets', '/budgets')->name('budgets.settings');
Route::get('settings/automation-rules', [\App\Http\Controllers\Settings\AutomationRuleController::class, 'index'])->name('automation-rules.index');
Route::post('settings/automation-rules', [\App\Http\Controllers\Settings\AutomationRuleController::class, 'store'])->name('automation-rules.store');
Route::patch('settings/automation-rules/{automationRule}', [\App\Http\Controllers\Settings\AutomationRuleController::class, 'update'])->name('automation-rules.update');

View File

@ -0,0 +1,16 @@
<?php
use App\Models\User;
use function Pest\Laravel\actingAs;
use function Pest\Laravel\get;
test('settings budgets route redirects to the budgets index page', function () {
$user = User::factory()->create(['onboarded_at' => now()]);
actingAs($user);
$response = get(route('budgets.settings'));
$response->assertRedirect(route('budgets.index'));
});