feat(KAN-22): rebuild password confirmation flows
CI/CD / test_and_check_app (push) Successful in 4m50s
CI/CD / Publish immutable image (push) Skipped
CI/CD / test_and_check_app (pull_request) Canceled after 0s
CI/CD / Publish immutable image (pull_request) Canceled after 0s

This commit is contained in:
2026-09-10 12:28:55 +02:00
parent a43aff0477
commit be89a4900d
7 changed files with 506 additions and 269 deletions
@@ -11,7 +11,7 @@ class PasswordConfirmationTest extends TestCase
{
use RefreshDatabase;
public function test_confirm_password_screen_can_be_rendered()
public function test_confirm_password_screen_can_be_rendered(): void
{
$user = User::factory()->create();
@@ -24,10 +24,32 @@ class PasswordConfirmationTest extends TestCase
);
}
public function test_password_confirmation_requires_authentication()
public function test_password_confirmation_requires_authentication(): void
{
$response = $this->get(route('password.confirm'));
$response->assertRedirect(route('login'));
}
public function test_password_can_be_confirmed(): void
{
$user = User::factory()->create();
$this->actingAs($user)
->post(route('password.confirm'), ['password' => 'password'])
->assertSessionHasNoErrors();
$this->assertNotNull(session('auth.password_confirmed_at'));
}
public function test_password_confirmation_rejects_an_invalid_password(): void
{
$user = User::factory()->create();
$this->actingAs($user)
->post(route('password.confirm'), ['password' => 'incorrect'])
->assertSessionHasErrors('password');
$this->assertNull(session('auth.password_confirmed_at'));
}
}