Install Breeze

This commit is contained in:
Benjamin Nussbaum 2025-02-08 15:06:14 +01:00
parent 337c77f8a2
commit 32d63c09e7
55 changed files with 5782 additions and 88 deletions

View file

@ -0,0 +1,46 @@
<?php
namespace Tests\Feature\Auth;
use App\Models\User;
use Livewire\Volt\Volt;
test('confirm password screen can be rendered', function () {
$user = User::factory()->create();
$response = $this->actingAs($user)->get('/confirm-password');
$response
->assertSeeVolt('pages.auth.confirm-password')
->assertStatus(200);
});
test('password can be confirmed', function () {
$user = User::factory()->create();
$this->actingAs($user);
$component = Volt::test('pages.auth.confirm-password')
->set('password', 'password');
$component->call('confirmPassword');
$component
->assertRedirect('/dashboard')
->assertHasNoErrors();
});
test('password is not confirmed with invalid password', function () {
$user = User::factory()->create();
$this->actingAs($user);
$component = Volt::test('pages.auth.confirm-password')
->set('password', 'wrong-password');
$component->call('confirmPassword');
$component
->assertNoRedirect()
->assertHasErrors('password');
});