comparison stubs/default/pest-tests/Feature/Auth/PasswordConfirmationTest.php @ 0:90e38de8f2ba

Initial Commit
author luka
date Wed, 13 Aug 2025 22:17:20 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:90e38de8f2ba
1 <?php
2
3 use App\Models\User;
4
5 test('confirm password screen can be rendered', function () {
6 $user = User::factory()->create();
7
8 $response = $this->actingAs($user)->get('/confirm-password');
9
10 $response->assertStatus(200);
11 });
12
13 test('password can be confirmed', function () {
14 $user = User::factory()->create();
15
16 $response = $this->actingAs($user)->post('/confirm-password', [
17 'password' => 'password',
18 ]);
19
20 $response->assertRedirect();
21 $response->assertSessionHasNoErrors();
22 });
23
24 test('password is not confirmed with invalid password', function () {
25 $user = User::factory()->create();
26
27 $response = $this->actingAs($user)->post('/confirm-password', [
28 'password' => 'wrong-password',
29 ]);
30
31 $response->assertSessionHasErrors();
32 });