Files
DredgeTours/tests/Feature/Auth/RegistrationTest.php
2025-09-13 22:32:19 +10:00

21 lines
579 B
PHP

<?php
uses(\Illuminate\Foundation\Testing\RefreshDatabase::class);
test('registration screen can be rendered', function () {
$response = $this->get(route('register'));
$response->assertStatus(200);
});
test('new users can register', function () {
$response = $this->post(route('register.store'), [
'name' => 'Test User',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
});