scripthost/tests/Feature/Auth/RegistrationTest.php
Javier Feliz 9b2b993418
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Setup
2025-07-22 17:49:01 -04:00

25 lines
636 B
PHP

<?php
use App\Livewire\Auth\Register;
use Livewire\Livewire;
test('registration screen can be rendered', function () {
$response = $this->get('/register');
$response->assertStatus(200);
});
test('new users can register', function () {
$response = Livewire::test(Register::class)
->set('name', 'Test User')
->set('email', 'test@example.com')
->set('password', 'password')
->set('password_confirmation', 'password')
->call('register');
$response
->assertHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
$this->assertAuthenticated();
});