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

@ -3,21 +3,20 @@
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
test('registration screen can be rendered', function (): void {
$response = $this->get('/register');
$response = $this->get(route('register'));
$response->assertStatus(200);
$response->assertOk();
});
test('new users can register', function (): void {
$response = Livewire::test('auth.register')
->set('name', 'Test User')
->set('email', 'test@example.com')
->set('password', 'password')
->set('password_confirmation', 'password')
->call('register');
$response = $this->post(route('register.store'), [
'name' => 'John Doe',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$response
->assertHasNoErrors()
$response->assertSessionHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
$this->assertAuthenticated();