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

@@ -0,0 +1,40 @@
<?php
use App\Jobs\SendVerificationEmailJob;
use Illuminate\Support\Facades\Queue;
test('registration screen can be rendered', function () {
$response = $this->get('/register');
$response->assertStatus(200)
->assertSee('Read signup and login help')
->assertSee(route('help.auth'), false)
->assertSee(route('help.troubleshooting'), false)
->assertDontSee('name="name"', false)
->assertDontSee('name="username"', false)
->assertDontSee('name="password"', false)
->assertDontSee('name="password_confirmation"', false);
});
test('new users can register', function () {
Queue::fake();
$response = $this->post('/register', [
'email' => 'test@example.com',
]);
$this->assertGuest();
$response->assertRedirect(route('register.notice', absolute: false));
$this->assertDatabaseHas('users', [
'email' => 'test@example.com',
'onboarding_step' => 'email',
'is_active' => 0,
]);
$this->assertDatabaseHas('user_verification_tokens', [
'user_id' => (int) \App\Models\User::query()->where('email', 'test@example.com')->value('id'),
]);
Queue::assertPushed(SendVerificationEmailJob::class);
});