herbarium/tests/Feature/Auth/RegistrationTest.php
Alyx Batte 5280d46d07
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
initial commit
2025-11-18 19:31:28 -05:00

21 lines
554 B
PHP

<?php
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' => 'John Doe',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$response->assertSessionHasNoErrors()
->assertRedirect(route('dashboard', absolute: false));
$this->assertAuthenticated();
});