complete story 1.3 with qa test & added future recommendations to the dev

This commit is contained in:
Naser Mansour
2025-12-26 14:04:24 +02:00
parent 84d9c2f66a
commit ebb6841ed0
29 changed files with 760 additions and 101 deletions
+7 -15
View File
@@ -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();
});