Files
Meghdad 40a00388ac
linter / quality (push) Successful in 4m13s
tests / ci (8.4) (push) Successful in 6m33s
tests / ci (8.5) (push) Successful in 2m48s
update packages
2026-11-25 21:50:46 +03:30

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