Install Pest

This commit is contained in:
Bob Molitor committed 2025-10-16 14:22:58 +02:00
1 parent 81a98dd9f4
commit e8db0d9a5a
16 files changed
+1618 -805

No files matched your search

+16 -27
View File
@@ -1,35 +1,24 @@
<?php
namespace Tests\Feature\Auth;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Livewire\Volt\Volt;
use Tests\TestCase;
class RegistrationTest extends TestCase
{
use RefreshDatabase;
test('registration screen can be rendered', function () {
$response = $this->get(route('register'));
public function test_registration_screen_can_be_rendered(): void
{
$response = $this->get(route('register'));
$response->assertStatus(200);
});
$response->assertStatus(200);
}
test('new users can register', function () {
$response = Volt::test('auth.register')
->set('name', 'Test User')
->set('email', 'test@example.com')
->set('password', 'password')
->set('password_confirmation', 'password')
->call('register');
public function test_new_users_can_register(): 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));
$response
->assertHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
$this->assertAuthenticated();
}
}
$this->assertAuthenticated();
});