Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide helper for asserting redirection #534

Closed
wants to merge 3 commits into from

Conversation

deleugpn
Copy link

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.

@driesvints driesvints deleted the branch inertiajs:master May 15, 2024 15:01
@driesvints driesvints closed this May 15, 2024
@driesvints
Copy link
Collaborator

Heya. We removed our master branch. Feel free to re-attempt this to 1.x!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants