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.

Reset request_params in TestRequest#recycle!

#2271

We used to do self.request_params = {} in TestRequest#recycle! but this has been taken out, I guess as part of the Rack rewrite. The consequence is that if you do multiple post requests within the same test block then the params hash is not cleared from one request to the next. This patch fixes the issue by clearing out the post params.

Reported by Peter Marklund · March 17th, 2009 @ 02:47 PM

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

Activity

  1. Pratik
    Pratik
    • Tag set to 2.3.2, actioncontroller, actionpack, patch, test
    • Assigned user set to josh

    March 17th, 2009 @ 03:09 PM

  2. Repository
    Repository
    • State changed from new to resolved

    (from [daffa5cbddace5a68ce09808a827805ef81ddb84]) Reset request_parameters in TestRequest#recycle! to avoid multiple posts clobbering each other [#2271 Reset request_params in TestRequest#recycle! state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    March 24th, 2009 @ 03:54 PM

  3. Repository
    Repository

    (from [8fa4275a72c334fe945dada6113fa0153ca28c87]) Reset request_parameters in TestRequest#recycle! to avoid multiple posts clobbering each other [#2271 Reset request_params in TestRequest#recycle! state:resolved]

    Signed-off-by: Joshua Peek josh@joshpeek.com http://github.com/rails/rails/co...

    March 24th, 2009 @ 03:54 PM