How about using $this->call() ?
$response = $this->call('GET', "/order/$id", [], [], [], $headers);
$this->assertEquals(403, $response->status());
Did you guys figure out how to fix this, I am having the same problem where the policy is kicking out my actingAs($user) for my app and responding with a 403 everytime. Any ideas how to fix this unit test?
try:
$this->get('/route')
->assertResponseStatus(403);
not visit
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community