Support the ongoing development of Laravel.io →
Testing
Last updated 2 years ago.
0

How about using $this->call() ?

$response = $this->call('GET', "/order/$id", [], [], [], $headers);
$this->assertEquals(403, $response->status());
0

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?

0

try:

$this->get('/route')
            ->assertResponseStatus(403);

not visit

Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.