25 lines
591 B
PHP
25 lines
591 B
PHP
<?php
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
test('confirm password screen can be rendered', function () {
|
|
$user = User::factory()->create();
|
|
|
|
$response = $this->actingAs($user)->get('/confirm-password');
|
|
|
|
$response->assertStatus(200);
|
|
});
|
|
|
|
test('password is not confirmed with invalid password', function () {
|
|
$user = User::factory()->create();
|
|
|
|
$response = $this->actingAs($user)->post('/confirm-password', [
|
|
'password' => 'wrong-password',
|
|
]);
|
|
|
|
$response->assertSessionHasErrors();
|
|
});
|