diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2015-08-24 06:05:07 +0000 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2015-08-24 06:05:07 +0000 |
commit | 4f252cddc1ee4e28c633a2250335b2fac4d31108 (patch) | |
tree | 776177555c7039204e23c9c1b7d33b700d366ca3 /actionpack/test/dispatch/request/multipart_params_parsing_test.rb | |
parent | bc36ffeec05692777f4ece09978a321feed2d818 (diff) | |
parent | 06818cb9a8cee8c95eaebdd1418e6fcb0da9382e (diff) | |
download | rails-4f252cddc1ee4e28c633a2250335b2fac4d31108.tar.gz rails-4f252cddc1ee4e28c633a2250335b2fac4d31108.tar.bz2 rails-4f252cddc1ee4e28c633a2250335b2fac4d31108.zip |
Merge branch 'master' of github.com:rails/rails
Conflicts:
guides/source/security.md
Diffstat (limited to 'actionpack/test/dispatch/request/multipart_params_parsing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/request/multipart_params_parsing_test.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb index 50f69c53cb..b36fbd3c76 100644 --- a/actionpack/test/dispatch/request/multipart_params_parsing_test.rb +++ b/actionpack/test/dispatch/request/multipart_params_parsing_test.rb @@ -17,7 +17,7 @@ class MultipartParamsParsingTest < ActionDispatch::IntegrationTest end def read - render :text => "File: #{params[:uploaded_data].read}" + render plain: "File: #{params[:uploaded_data].read}" end end @@ -63,6 +63,17 @@ class MultipartParamsParsingTest < ActionDispatch::IntegrationTest assert_equal 'contents', file.read end + test "parses utf8 filename with percent character" do + params = parse_multipart('utf8_filename') + assert_equal %w(file foo), params.keys.sort + assert_equal 'bar', params['foo'] + + file = params['file'] + assert_equal 'ファイル%名.txt', file.original_filename + assert_equal "text/plain", file.content_type + assert_equal 'contents', file.read + end + test "parses boundary problem file" do params = parse_multipart('boundary_problem_file') assert_equal %w(file foo), params.keys.sort |