15 - Update tests for single-scenario routing
This commit is contained in:
parent
962acdc6ae
commit
969c97b165
5 changed files with 7 additions and 7 deletions
|
|
@ -73,7 +73,7 @@
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'home' => '/dashboard',
|
'home' => '/',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public function test_users_can_authenticate_using_the_login_screen()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertAuthenticated();
|
$this->assertAuthenticated();
|
||||||
$response->assertRedirect(route('dashboard', absolute: false));
|
$response->assertRedirect('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_users_with_two_factor_enabled_are_redirected_to_two_factor_challenge()
|
public function test_users_with_two_factor_enabled_are_redirected_to_two_factor_challenge()
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public function test_email_can_be_verified()
|
||||||
|
|
||||||
Event::assertDispatched(Verified::class);
|
Event::assertDispatched(Verified::class);
|
||||||
$this->assertTrue($user->fresh()->hasVerifiedEmail());
|
$this->assertTrue($user->fresh()->hasVerifiedEmail());
|
||||||
$response->assertRedirect(route('dashboard', absolute: false).'?verified=1');
|
$response->assertRedirect('/'.'?verified=1');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_email_is_not_verified_with_invalid_hash()
|
public function test_email_is_not_verified_with_invalid_hash()
|
||||||
|
|
@ -81,7 +81,7 @@ public function test_verified_user_is_redirected_to_dashboard_from_verification_
|
||||||
|
|
||||||
$response = $this->actingAs($user)->get(route('verification.notice'));
|
$response = $this->actingAs($user)->get(route('verification.notice'));
|
||||||
|
|
||||||
$response->assertRedirect(route('dashboard', absolute: false));
|
$response->assertRedirect('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_already_verified_user_visiting_verification_link_is_redirected_without_firing_event_again(): void
|
public function test_already_verified_user_visiting_verification_link_is_redirected_without_firing_event_again(): void
|
||||||
|
|
@ -99,7 +99,7 @@ public function test_already_verified_user_visiting_verification_link_is_redirec
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->actingAs($user)->get($verificationUrl)
|
$this->actingAs($user)->get($verificationUrl)
|
||||||
->assertRedirect(route('dashboard', absolute: false).'?verified=1');
|
->assertRedirect('/'.'?verified=1');
|
||||||
|
|
||||||
$this->assertTrue($user->fresh()->hasVerifiedEmail());
|
$this->assertTrue($user->fresh()->hasVerifiedEmail());
|
||||||
Event::assertNotDispatched(Verified::class);
|
Event::assertNotDispatched(Verified::class);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,6 @@ public function test_new_users_can_register()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertAuthenticated();
|
$this->assertAuthenticated();
|
||||||
$response->assertRedirect(route('dashboard', absolute: false));
|
$response->assertRedirect('/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public function test_does_not_send_verification_notification_if_email_is_verifie
|
||||||
|
|
||||||
$this->actingAs($user)
|
$this->actingAs($user)
|
||||||
->post(route('verification.send'))
|
->post(route('verification.send'))
|
||||||
->assertRedirect(route('dashboard', absolute: false));
|
->assertRedirect('/');
|
||||||
|
|
||||||
Notification::assertNothingSent();
|
Notification::assertNothingSent();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue