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

[5.4] Add assertSuccessful(), tweak assertRedirect() #18629

Merged
merged 1 commit into from Apr 4, 2017

Conversation

dwightwatson
Copy link
Contributor

This adds assertSuccessful() which is similar to a helper that existed back in Laravel 5.3 and also makes a slight tweak to the functionality of assertRedirect() so it can be used more loosely.

assertSuccessful() just asserts that the status code is 2xx, which is handy when you don't really care if the response is OK, Created, No Content etc.

assertRedirect()'s argument is now optional, and by calling it without an argument you simply assert that the response is a redirect, making no assertion on where it actually redirects to.

@tillkruss tillkruss changed the title Add assertSuccessful(), tweak assertRedirect() [5.4] Add assertSuccessful(), tweak assertRedirect() Apr 3, 2017
@taylorotwell taylorotwell merged commit 77860a8 into laravel:5.4 Apr 4, 2017
@dwightwatson dwightwatson deleted the feature/response-assertions branch April 4, 2017 03:58
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