feat: Phase 5 - polish, validation, rate limiting, Dutch translations

This commit is contained in:
2026-04-03 22:13:59 +02:00
parent 83e2158383
commit 330950cc6e
18 changed files with 251 additions and 102 deletions

View File

@@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Tests\Feature\Auth;
use Illuminate\Foundation\Testing\RefreshDatabase;
@@ -9,14 +11,14 @@ class RegistrationTest extends TestCase
{
use RefreshDatabase;
public function test_registration_screen_can_be_rendered(): void
public function test_registration_is_disabled(): void
{
$response = $this->get('/register');
$response->assertStatus(200);
$response->assertNotFound();
}
public function test_new_users_can_register(): void
public function test_registration_post_is_rejected(): void
{
$response = $this->post('/register', [
'name' => 'Test User',
@@ -25,7 +27,7 @@ class RegistrationTest extends TestCase
'password_confirmation' => 'password',
]);
$this->assertAuthenticated();
$response->assertRedirect(route('admin.dashboard', absolute: false));
$response->assertNotFound();
$this->assertGuest();
}
}

View File

@@ -10,10 +10,10 @@ class ExampleTest extends TestCase
/**
* A basic test example.
*/
public function test_the_application_returns_a_successful_response(): void
public function test_root_redirects_to_admin_dashboard(): void
{
$response = $this->get('/');
$response->assertStatus(200);
$response->assertRedirect(route('admin.dashboard', absolute: false));
}
}