This project is archived and is in readonly mode.

#866 ✓wontfix
Chad

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

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>

People watching this ticket

Pages