fix: resolve 15 pre-existing test failures flagged across 3 retrospectives
Delete 14 legacy Folder test files (FolderTypeTest, MediaDownloadTest, FolderMentionTest) that referenced removed routes/tables from the Epic 0 folders-to-declarations rename. Declaration equivalents already exist. Fix WorkerDashboardTest session edge case where HandleInertiaRequests middleware auto-assigns workspace, invalidating the no-session assumption. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -267,13 +267,11 @@ test('owner and manager dashboard returns isWorker false', function () {
|
||||
);
|
||||
});
|
||||
|
||||
test('worker without workspace session gets isWorker false in fallback', function () {
|
||||
$worker = User::factory()->create();
|
||||
$workspace = Workspace::factory()->create();
|
||||
$workspace->users()->attach($worker->id, ['role' => 'worker']);
|
||||
test('user without any workspace gets isWorker false in fallback', function () {
|
||||
$user = User::factory()->create();
|
||||
|
||||
// No session(['current_workspace_id' => ...]) — simulate no active workspace
|
||||
$this->actingAs($worker);
|
||||
// User has no workspace attachments — middleware cannot auto-assign
|
||||
$this->actingAs($user);
|
||||
$response = $this->get(route('dashboard'));
|
||||
|
||||
$response->assertOk();
|
||||
|
||||
Reference in New Issue
Block a user