This project is archived and is in readonly mode.

#2333 ✓duplicate
Ryan Angilly

TestRequest doesn't reset query parameters before request

Reported by Ryan Angilly | March 25th, 2009 @ 03:58 AM | in 2.x

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 => ''
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.

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=""></a>

People watching this ticket