unverified()->create(); $response = actingAs($user)->post(route('verification.send')); Notification::assertSentTo($user, VerifyEmail::class); $response->assertRedirect(); $response->assertSessionHas('status', 'verification-link-sent'); }); it('redirects verified users to the intended dashboard', function () { Notification::fake(); $user = User::factory()->create(); $response = actingAs($user)->post(route('verification.send')); Notification::assertNothingSent(); $response->assertRedirect(route('dashboard', absolute: false)); });