New task - password confirmation

This commit is contained in:
PovilasKorop
2021-11-01 08:36:28 +02:00
parent 355d40f627
commit 0240281ef9
4 changed files with 48 additions and 1 deletions
+14
View File
@@ -116,4 +116,18 @@ class AuthenticationTest extends TestCase
$response = $this->get('/secretpage');
$response->assertOk();
}
public function test_password_confirmation_page()
{
$user = User::factory()->create();
$response = $this->actingAs($user)->get('/verysecretpage');
$response->assertRedirect('/confirm-password');
$response = $this->actingAs($user)->post('/confirm-password', [
'password' => 'password',
]);
$response->assertRedirect();
$response->assertSessionHasNoErrors();
}
}