This project is archived and is in readonly mode.

#217 ✓resolved
Esad Hajdarevic

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

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

Pages