diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-03 12:10:11 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-03 12:10:11 +0200 |
commit | ed3e667415e191d1677a3b7e55b077f55504214c (patch) | |
tree | e5b6d3f54c5286ec8559e5a28338fb1c525d6f74 /actionpack | |
parent | ce6fef9d8b3ed282d4735fcff3dcf7fe9d89e57d (diff) | |
download | rails-ed3e667415e191d1677a3b7e55b077f55504214c.tar.gz rails-ed3e667415e191d1677a3b7e55b077f55504214c.tar.bz2 rails-ed3e667415e191d1677a3b7e55b077f55504214c.zip |
Multipart is now fixed in Rack.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/request/multipart_params_parsing_test.rb | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb index 3ff558ec5a..560ea00923 100644 --- a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb @@ -82,21 +82,15 @@ class MultipartParamsParsingTest < ActionDispatch::IntegrationTest assert_equal 19512, file.size end - # Pending fix in Rack 1.2.2 - # http://rack.lighthouseapp.com/projects/22435-rack/tickets/79-multipart-handling-incorrectly-assuming-file-upload test "parses mixed files" do - if Rack.release <= '1.2.1' - $stderr.puts 'multipart/mixed parsing pending fix in Rack 1.2.2' - else - params = parse_multipart('mixed_files') - assert_equal %w(files foo), params.keys.sort - assert_equal 'bar', params['foo'] - - # Rack doesn't handle multipart/mixed for us. - files = params['files'] - files.force_encoding('ASCII-8BIT') if files.respond_to?(:force_encoding) - assert_equal 19756, files.size - end + params = parse_multipart('mixed_files') + assert_equal %w(files foo), params.keys.sort + assert_equal 'bar', params['foo'] + + # Rack doesn't handle multipart/mixed for us. + files = params['files'] + files.force_encoding('ASCII-8BIT') if files.respond_to?(:force_encoding) + assert_equal 19756, files.size end test "does not create tempfile if no file has been selected" do |