refactor: rebase on Livewire 4 starter kit

This commit is contained in:
Benjamin Nussbaum 2026-01-15 21:55:24 +01:00
parent b097b0a7d7
commit e660da46fb
69 changed files with 1967 additions and 942 deletions

View file

@ -7,33 +7,7 @@ uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
test('confirm password screen can be rendered', function (): void {
$user = User::factory()->create();
$response = $this->actingAs($user)->get('/confirm-password');
$response = $this->actingAs($user)->get(route('password.confirm'));
$response->assertStatus(200);
});
test('password can be confirmed', function (): void {
$user = User::factory()->create();
$this->actingAs($user);
$response = Livewire::test('auth.confirm-password')
->set('password', 'password')
->call('confirmPassword');
$response
->assertHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
});
test('password is not confirmed with invalid password', function (): void {
$user = User::factory()->create();
$this->actingAs($user);
$response = Livewire::test('auth.confirm-password')
->set('password', 'wrong-password')
->call('confirmPassword');
$response->assertHasErrors(['password']);
$response->assertOk();
});