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