feat(auth): complete registration anti-spam and quota hardening

This commit is contained in:
2026-02-21 12:13:01 +01:00
parent 4fb95c872b
commit b239af9619
33 changed files with 1288 additions and 142 deletions

View File

@@ -1,7 +1,7 @@
<?php
use App\Mail\RegistrationVerificationMail;
use Illuminate\Support\Facades\Mail;
use App\Jobs\SendVerificationEmailJob;
use Illuminate\Support\Facades\Queue;
test('registration screen can be rendered', function () {
$response = $this->get('/register');
@@ -14,7 +14,7 @@ test('registration screen can be rendered', function () {
});
test('new users can register', function () {
Mail::fake();
Queue::fake();
$response = $this->post('/register', [
'email' => 'test@example.com',
@@ -33,5 +33,5 @@ test('new users can register', function () {
'user_id' => (int) \App\Models\User::query()->where('email', 'test@example.com')->value('id'),
]);
Mail::assertQueued(RegistrationVerificationMail::class);
Queue::assertPushed(SendVerificationEmailJob::class);
});