mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 15:07:49 +00:00
27 lines
675 B
PHP
27 lines
675 B
PHP
<?php
|
|
|
|
namespace Tests\Feature\Auth;
|
|
|
|
use Livewire\Volt\Volt;
|
|
|
|
// test('registration screen can be rendered', function () {
|
|
// $response = $this->get('/register');
|
|
//
|
|
// $response
|
|
// ->assertOk()
|
|
// ->assertSeeVolt('pages.auth.register');
|
|
// });
|
|
|
|
test('new users can register', function () {
|
|
$component = Volt::test('pages.auth.register')
|
|
->set('name', 'Test User')
|
|
->set('email', 'test@example.com')
|
|
->set('password', 'password')
|
|
->set('password_confirmation', 'password');
|
|
|
|
$component->call('register');
|
|
|
|
$component->assertRedirect(route('dashboard', absolute: false));
|
|
|
|
$this->assertAuthenticated();
|
|
});
|