for($tenant)->create([ 'status' => 'acknowledged', 'acknowledged_at' => now(), 'acknowledged_by_user_id' => $user->getKey(), ]); expect(fn () => app(FindingWorkflowService::class)->triage($finding, $tenant, $user)) ->toThrow(\InvalidArgumentException::class, 'Finding cannot be triaged from the current status.'); }); it('rejects start progress from the removed acknowledged status', function (): void { [$user, $tenant] = createUserWithTenant(role: 'owner'); $finding = Finding::factory()->for($tenant)->create([ 'status' => 'acknowledged', 'triaged_at' => now()->subMinute(), 'acknowledged_at' => now(), 'acknowledged_by_user_id' => $user->getKey(), ]); expect(fn () => app(FindingWorkflowService::class)->startProgress($finding, $tenant, $user)) ->toThrow(\InvalidArgumentException::class, 'Finding cannot be moved to in-progress from the current status.'); });