From 6a0faf75c4b113a73a1b2c484f275f0f7a724851 Mon Sep 17 00:00:00 2001 From: Paulo Castellano Date: Wed, 6 May 2026 17:24:47 -0300 Subject: [PATCH] test: update workspace creation redirects to include openDialog parameter --- tests/Feature/WorkspaceControllerTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Feature/WorkspaceControllerTest.php b/tests/Feature/WorkspaceControllerTest.php index 77115a43..864a9b6d 100644 --- a/tests/Feature/WorkspaceControllerTest.php +++ b/tests/Feature/WorkspaceControllerTest.php @@ -87,7 +87,7 @@ 'name' => 'New Workspace', ]); - $response->assertRedirect(route('app.accounts')); + $response->assertRedirect(route('app.accounts', ['openDialog' => 'true'])); $this->assertDatabaseHas('workspaces', [ 'name' => 'New Workspace', @@ -102,7 +102,7 @@ 'name' => 'Second Workspace', ]); - $response->assertRedirect(route('app.calendar')); + $response->assertRedirect(route('app.accounts', ['openDialog' => 'true'])); $this->assertDatabaseHas('workspaces', [ 'name' => 'Second Workspace', @@ -411,7 +411,7 @@ }); // Brand-aware store tests -test('store persists brand fields and redirects first workspace to /accounts', function () { +test('store persists brand fields and redirects to /accounts with openDialog flag', function () { $account = Account::factory()->create(); $user = User::factory()->create(['account_id' => $account->id]); $account->update(['owner_id' => $user->id]); @@ -432,7 +432,7 @@ 'content_language' => 'en', ]); - $response->assertRedirect(route('app.accounts')); + $response->assertRedirect(route('app.accounts', ['openDialog' => 'true'])); $workspace = Workspace::where('name', 'Acme Inc')->sole(); expect($workspace->name)->toBe('Acme Inc'); @@ -440,7 +440,7 @@ expect($workspace->brand_description)->toBe('We sell rockets.'); }); -test('store redirects to /calendar for additional workspace (existing user)', function () { +test('store redirects additional workspace to /accounts with openDialog flag', function () { $account = Account::factory()->create(); $user = User::factory()->create(['account_id' => $account->id]); $account->update(['owner_id' => $user->id]); @@ -460,7 +460,7 @@ 'name' => 'Second Workspace', ]); - $response->assertRedirect(route('app.calendar')); + $response->assertRedirect(route('app.accounts', ['openDialog' => 'true'])); expect(Workspace::where('account_id', $account->id)->count())->toBe(2); });