complete story 1.3 with qa test & added future recommendations to the dev

This commit is contained in:
Naser Mansour
2025-12-26 14:04:24 +02:00
parent 84d9c2f66a
commit ebb6841ed0
29 changed files with 760 additions and 101 deletions
+5 -3
View File
@@ -29,7 +29,8 @@ test('email can be verified', function () {
Event::assertDispatched(Verified::class);
expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
$response->assertRedirect(route('dashboard', absolute: false).'?verified=1');
// Redirects to client dashboard since factory creates individual users
$response->assertRedirect('/client/dashboard?verified=1');
});
test('email is not verified with invalid hash', function () {
@@ -60,8 +61,9 @@ test('already verified user visiting verification link is redirected without fir
);
$this->actingAs($user)->get($verificationUrl)
->assertRedirect(route('dashboard', absolute: false).'?verified=1');
// Redirects to client dashboard since factory creates individual users
->assertRedirect('/client/dashboard?verified=1');
expect($user->fresh()->hasVerifiedEmail())->toBeTrue();
Event::assertNotDispatched(Verified::class);
});
});