%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/vacivi36/.trash/tests/Feature/Auth/
Upload File :
Create Path :
Current File : /home/vacivi36/.trash/tests/Feature/Auth/PasswordConfirmationTest.php

<?php

use App\Models\User;

test('confirm password screen can be rendered', function () {
    $user = User::factory()->create();

    $response = $this->actingAs($user)->get('/confirm-password');

    $response->assertStatus(200);
});

test('password can be confirmed', function () {
    $user = User::factory()->create();

    $response = $this->actingAs($user)->post('/confirm-password', [
        'password' => 'password',
    ]);

    $response->assertRedirect();
    $response->assertSessionHasNoErrors();
});

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();
});

Zerion Mini Shell 1.0