Save workspace changes

This commit is contained in:
2026-04-18 17:02:56 +02:00
parent f02ea9a711
commit 87d60af5a9
4220 changed files with 1388603 additions and 1554 deletions

View File

@@ -1,7 +1,7 @@
<?php
use App\Jobs\SendVerificationEmailJob;
use App\Mail\RegistrationVerificationMail;
use App\Models\User;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Queue;
@@ -30,16 +30,20 @@ it('registration email contains verification link expiry and support url', funct
expect($html)->toContain('https://skinbase.example/support');
});
it('registration endpoint queues verification email job', function () {
it('registration endpoint skips verification email job and continues onboarding immediately', function () {
Queue::fake();
$this->post('/register', [
$response = $this->post('/register', [
'email' => 'mail-test@example.com',
])->assertRedirect('/register/notice');
]);
Queue::assertPushed(SendVerificationEmailJob::class);
$user = User::query()->where('email', 'mail-test@example.com')->firstOrFail();
$this->assertAuthenticatedAs($user);
$response->assertRedirect('/setup/password');
Queue::assertNothingPushed();
$this->assertDatabaseHas('users', [
'email' => 'mail-test@example.com',
'onboarding_step' => 'email',
'onboarding_step' => 'verified',
]);
});