siakad-itm/tests/Feature/Auth/RegistrationTest.php
Yoga Pangestu 9c2bb62666
Some checks failed
tests / ci (pull_request) Has been cancelled
fix: standardize closure syntax and ensure newline at end of file in multiple files
2026-08-25 18:16:54 +07:00

26 lines
631 B
PHP

<?php
use Laravel\Fortify\Features;
beforeEach(function () {
$this->skipUnlessFortifyHas(Features::registration());
});
test('registration screen can be rendered', function () {
$response = $this->get(route('register'));
$response->assertOk();
});
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));
});