create(); $this->actingAs($user); $this->get('/admin')->assertForbidden(); }); it('allows admin users to access admin panel', function () { $user = User::factory()->admin()->create(); $this->actingAs($user); $this->get('/admin')->assertOk(); });