Closed deleugpn closed 5 months ago
Inertia uses 409 as the status code for redirection. When writing tests in Laravel with
$this->post('/', headers: ['X-Inertia' => true])->assertRedirect('/redirected');
The test will fail because Laravel relies on $this->isRedirect() to validate whether the request returned a redirect. The isRedirect() method belongs to Symfony and it doesn't consider 409 as a valid status code, which means this always fail.
$this->isRedirect()
isRedirect()
Heya. We removed our master branch. Feel free to re-attempt this to 1.x!
Inertia uses 409 as the status code for redirection. When writing tests in Laravel with
The test will fail because Laravel relies on
$this->isRedirect()
to validate whether the request returned a redirect. TheisRedirect()
method belongs to Symfony and it doesn't consider 409 as a valid status code, which means this always fail.