byos_laravel/tests/Feature/Auth/RegistrationTest.php
Benjamin Nussbaum b4b6286172
Some checks are pending
tests / ci (push) Waiting to run
refactor: apply rector
2025-09-24 20:35:48 +02:00

26 lines
675 B
PHP

<?php
use Livewire\Volt\Volt;
uses(Illuminate\Foundation\Testing\RefreshDatabase::class);
test('registration screen can be rendered', function (): void {
$response = $this->get('/register');
$response->assertStatus(200);
});
test('new users can register', function (): void {
$response = Volt::test('auth.register')
->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();
});