Files
ClockyFly/tests/Feature/Auth/PasswordConfirmationTest.php
Darius Rapalis 7f6529cd5d
Some checks failed
tests / ci (8.4) (push) Failing after 1m49s
tests / ci (8.5) (push) Failing after 1m50s
linter / quality (push) Successful in 1m44s
tests / ci (8.3) (push) Failing after 2m10s
New Laravel Project
2026-04-28 17:08:26 +03:00

22 lines
568 B
PHP

<?php
use App\Models\User;
use Inertia\Testing\AssertableInertia as Assert;
test('confirm password screen can be rendered', function () {
$user = User::factory()->create();
$response = $this->actingAs($user)->get(route('password.confirm'));
$response->assertOk();
$response->assertInertia(fn (Assert $page) => $page
->component('auth/ConfirmPassword'),
);
});
test('password confirmation requires authentication', function () {
$response = $this->get(route('password.confirm'));
$response->assertRedirect(route('login'));
});