Files
memefast/tests/Feature/Auth/RegistrationTest.php
2025-07-01 23:13:09 +08:00

22 lines
599 B
PHP

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