diff options
author | Tim Vandecasteele <tim.vandecasteele@vasco.com> | 2012-06-21 10:16:28 +0200 |
---|---|---|
committer | Morton Jonuschat <yabawock@gmail.com> | 2012-09-29 16:31:10 +0200 |
commit | c53e5def08f7a289a92a8e5f79dcd7caa5c3a2fb (patch) | |
tree | ddbf0b3a1b464d65bccd0966150ea7d217311fba /actionpack/lib | |
parent | 8ca05c2ea2726671b46249a51dc9f5d44e965d46 (diff) | |
download | rails-c53e5def08f7a289a92a8e5f79dcd7caa5c3a2fb.tar.gz rails-c53e5def08f7a289a92a8e5f79dcd7caa5c3a2fb.tar.bz2 rails-c53e5def08f7a289a92a8e5f79dcd7caa5c3a2fb.zip |
Don't paramify ActionDispatch::Http::UploadedFile in tests
To test uploading a file without using fixture_file_upload, a posted
ActionDispatch::Http::UploadedFile should not be paramified (just like
Rack::Test::UploadedFile).
(Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't
share the same API, tempfile is not accessible on
Rack::Test::UploadedFile as discussed in
https://github.com/brynary/rack-test/issues/30)
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 05e3cd40b5..717e4043bb 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -422,7 +422,7 @@ module ActionController Hash[hash_or_array_or_value.map{|key, value| [key, paramify_values(value)] }] when Array hash_or_array_or_value.map {|i| paramify_values(i)} - when Rack::Test::UploadedFile + when Rack::Test::UploadedFile, ActionDispatch::Http::UploadedFile hash_or_array_or_value else hash_or_array_or_value.to_param |