complete story 1.3 with qa test & added future recommendations to the dev
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user