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.

MultiPart Integration Testing with Array params

#866

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

Reported by Chad · August 20th, 2008 @ 12:25 AM

State: wontfix
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. josh
    josh
    • State changed from new to wontfix

    Do you have a failing unit test to reproduce?

    November 22nd, 2008 @ 06:54 PM

  2. Jarl Friis
    Jarl Friis

    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

    January 18th, 2010 @ 01:52 PM