whisper-money/tests/Feature/Auth/RegistrationTest.php

24 lines
578 B
PHP

<?php
use Illuminate\Support\Facades\Queue;
test('registration screen can be rendered', function () {
$response = $this->get(route('register'));
$response->assertStatus(200);
});
test('new users can register', function () {
Queue::fake();
$response = $this->post(route('register.store'), [
'name' => 'Test User',
'email' => 'test@example.com',
'password' => 'password',
'password_confirmation' => 'password',
]);
$this->assertAuthenticated();
$response->assertRedirect(route('onboarding', absolute: false));
});