actingAs(User::factory()->create()) ->get(route('departments.index')) ->assertForbidden(); } public function testUserCanListDepartments() { $this->actingAs(User::factory()->superuser()->create()) ->get(route('departments.index')) ->assertOk(); } }