Files
Epicnabbo-Catalogus-Updated…/cms update/tests/Feature/RegistrationTest.php
T
Remco b67e0ec2b9 🆙 Add fixed cms 🆙
2026-02-02 19:30:21 +01:00

18 lines
550 B
PHP

<?php
use App\Providers\RouteServiceProvider;
test('new users can register', function () {
$response = $this->post('/register', [
'username' => 'Test_User',
'mail' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
'terms' => true,
]);
expect(auth()->check())->toBeTrue()
->and($response->status())->toBe(302)
->and(parse_url($response->headers->get('Location'), PHP_URL_PATH))->toBe(parse_url(RouteServiceProvider::HOME, PHP_URL_PATH));
});