modelWithPolicy('ilaravels', ['auth']) ->loginAs() ->getJson(route('api.ilaravels.show', $this->one(ILaravel::class))) ->assertOk(); } function test_auth_policy_fail() { $this->modelWithPolicy('ilaravels', ['auth']) ->getJson(route('api.ilaravels.show', $this->one(ILaravel::class))) ->assertForbidden(); } }