This project is archived and is in readonly mode.
MultiPart Integration Testing with Array params
Reported by Chad | August 20th, 2008 @ 12:25 AM | in 2.x
The Integration::Session post method does not handle parameters whose value is an array properly when their is a file upload.
The array value gets converted to a string.
For example, if @@@parameters = { "language" => [ "en" ], "image" => #<ActionController::TestUploadedFile... }@@@, then the language parameter gets compressed to @@@"en"@@@ instead of @@@[ "en" ]@@@.
If the "image" parameter was excluded then a multipart submission would not be created and "language" would pass through as an array.
I think the bug could probably be fixed in the private multipart_body method found in integration.rb by checking to see if the value is an array - but I'm not sure how to do this properly
Comments and changes to this ticket
-
josh November 22nd, 2008 @ 06:54 PM
- State changed from new to wontfix
Do you have a failing unit test to reproduce?
-
Jarl Friis January 18th, 2010 @ 01:52 PM
Chad. I believe we have run into the same problem. Could you please have a look at ticket 2576 and see if the patch there solves your problem.
Jarl
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>