This project is archived and is in readonly mode.
add client_error? to TestResponseBehavior
Reported by cainlevy | August 18th, 2008 @ 02:38 AM | in 2.x
ActionController::TestResponseBehavior has easy methods to check if the response code was a success (2xx), redirect (3xx), or server error (5xx). The attached patch (with test) adds a simple query method to check if the response was a client error (4xx).
This makes my tests prettier. :)
Comments and changes to this ticket
-
josh November 22nd, 2008 @ 07:09 PM
- State changed from new to open
-
Repository November 22nd, 2008 @ 07:22 PM
- State changed from open to resolved
(from [cd1a9ed991e8988dbcc28023b91e76b5ee45f79b]) Add TestResponse#client_error? to check for 4xx status codes [#851 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 851 add client_error? to TestResponseBehavior (from [cd1a9ed991e8988dbcc28023b91e76b5ee45f79b]) Add Tes...