Skip to content

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

Merged
taylorotwell merged 1 commit into
laravel:5.4from
dwightwatson:feature/response-assertions
Apr 4, 2017
Merged

[5.4] Add assertSuccessful(), tweak assertRedirect()#18629
taylorotwell merged 1 commit into
laravel:5.4from
dwightwatson:feature/response-assertions

Conversation

@dwightwatson

Copy link
Copy Markdown
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.

2 participants