get('/acesso-gestao')->assertOk()->assertInertia(fn (Assert $page) => $page ->component('management-access')->where('auth.user', null)->where('auth.canManagePortal', false)); $this->assertDatabaseCount('users', 0); } public function test_unverified_manager_can_view_setup_and_request_verification_but_cannot_manage(): void { Notification::fake(); $user = User::factory()->unverified()->create(); config(['portal.managers' => [$user->email]]); $this->actingAs($user)->get('/acesso-gestao')->assertOk() ->assertInertia(fn (Assert $page) => $page->where('auth.canManagePortal', false)); $this->get('/management/interests')->assertRedirect(route('verification.notice')); $this->post(route('verification.send'))->assertRedirect(); Notification::assertSentTo($user, VerifyEmail::class); $this->assertFalse($user->fresh()->hasVerifiedEmail()); } }