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.

IntegrationTest of rails app does not see rack middleware updates

#5628

I am currently trying to integration test a rails 2.3.8 app that uses the open_id_authentication plugin, which in turn uses the rack-openid middleware to detect a 401 unauthorized response and turn it into a redirect to the openid provider for validation.

In the integration test, I would like to use an assert_response 303 for the openid redirect, but currently it fails as the assert_response sees the 401 response of the rails app, rather than the modified 303 response from the rack middleware.

After changing http://github.com/rails/rails/blob/2-3-stable/actionpack/lib/action... to drop through to the else clause, the integration test works again. However, I don't have enough knowledge of rails to know what the correct fix is, or indeed if I am doing something wrong and this is the intended way of working.

However, the fact that there are a couple of inconsistencies with some parts of the testing framework seeing the rack responses and some the rails responses, I suspect this is an error in rails and thus I would like to raise the issue here for someone more knowledgeable to have a look

Thank you

Reported by apmonkey · September 13th, 2010 @ 09:56 PM

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

Activity

  1. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 2nd, 2011 @ 04:31 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:31 PM