complete story 1.3 with qa test & added future recommendations to the dev
This commit is contained in:
@@ -1,22 +1,14 @@
|
||||
<?php
|
||||
|
||||
test('registration screen can be rendered', function () {
|
||||
$response = $this->get(route('register'));
|
||||
use Laravel\Fortify\Features;
|
||||
|
||||
$response->assertStatus(200);
|
||||
test('registration is disabled', function () {
|
||||
// Registration is disabled per AC 7 - admin creates all accounts
|
||||
expect(Features::enabled(Features::registration()))->toBeFalse();
|
||||
});
|
||||
|
||||
test('new users can register', function () {
|
||||
$response = $this->post(route('register.store'), [
|
||||
'full_name' => 'John Doe',
|
||||
'email' => 'test@example.com',
|
||||
'phone' => '+1234567890',
|
||||
'password' => 'password',
|
||||
'password_confirmation' => 'password',
|
||||
]);
|
||||
test('registration route returns 404', function () {
|
||||
$response = $this->get('/register');
|
||||
|
||||
$response->assertSessionHasNoErrors()
|
||||
->assertRedirect(route('dashboard', absolute: false));
|
||||
|
||||
$this->assertAuthenticated();
|
||||
$response->assertNotFound();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user