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.

TestRequest doesn't reset query parameters before request

#2333

I had a test that was performing multiple xhr requests, and it started failing after upgrading to 2.3.2. Turns out that the query parameters were being concatenated such that:


xhr :post, :signin, :password => 'correct'
assert_template 'signin/index'

xhr :post, :signin, :email => 'ryan@angilly.com'
assert_template 'signin/index'

was failing on the second assertion because the action was getting password and email and rendering the next action.

This is because the query parameters are no longer in @parameters (which is what currentl gets cleared). This patch clears @env['action_controller.request.query_parameters'] on the Rack::Request object and includes a test.

Reported by Ryan Angilly · March 25th, 2009 @ 03:58 AM

State: duplicate
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. Ryan Angilly
  2. josh
    josh
    • State changed from new to duplicate

    April 2nd, 2009 @ 01:32 AM