get('/register'); $response->assertStatus(200) ->assertDontSee('name="name"', false) ->assertDontSee('name="username"', false) ->assertDontSee('name="password"', false) ->assertDontSee('name="password_confirmation"', false); }); test('new users can register', function () { Mail::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'), ]); Mail::assertQueued(RegistrationVerificationMail::class); });