This project is archived and is in readonly mode.
response#success? isn't true for response "201 created"
Reported by Esad Hajdarevic | May 17th, 2008 @ 11:10 PM
In module TestResponseBehavior, in actionpack/lib/action_controller/test_process.rb, whose methods are included in CgiResponse during integration testing, success? is defined as response_code == 200
My RESTful controller will return "201 created" for create, and this isn't considered successful.
We should probably do (200..299).include?(response_code) here, or refactor this so that code from assert_response is reused.
Comments and changes to this ticket
-
Repository July 17th, 2008 @ 01:47 AM
- State changed from new to resolved
- Tag set to actionpack
(from [cd6301557005617583e3f9ca5fb56297adcce7cc]) All 2xx requests are considered successful [#217 state:resolved]
-
Repository August 25th, 2008 @ 09:27 AM
(from [0e10e93fcf8ab68944e3e76195e75cae8e72cae3]) All 2xx requests are considered successful [#217 state:resolved] 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
Tags
Referenced by
- 217 response#success? isn't true for response "201 created" (from [0e10e93fcf8ab68944e3e76195e75cae8e72cae3]) All 2xx...