Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

response#success? isn't true for response "201 created"

#217

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.

Reported by Esad Hajdarevic · May 17th, 2008 @ 11:10 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Repository
    Repository
    • State changed from new to resolved
    • Tag set to actionpack

    (from [cd6301557005617583e3f9ca5fb56297adcce7cc]) All 2xx requests are considered successful [#217 state:resolved]

    http://github.com/rails/rails/co...

    July 17th, 2008 @ 01:47 AM

  2. Repository
    Repository

    (from [0e10e93fcf8ab68944e3e76195e75cae8e72cae3]) All 2xx requests are considered successful [#217 response#success? isn't true for response "201 created" state:resolved] http://github.com/rails/rails/co...

    August 25th, 2008 @ 09:27 AM