diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-24 23:37:37 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-24 23:37:37 +0000 |
commit | 06f325f478fa1f9b8198a1e8ee56362b78a39121 (patch) | |
tree | 1324953a9a164e046b17ecf8d48231a01efb4650 | |
parent | 74d1512b99e17c25de5ed42eb844374969847619 (diff) | |
download | rails-06f325f478fa1f9b8198a1e8ee56362b78a39121.tar.gz rails-06f325f478fa1f9b8198a1e8ee56362b78a39121.tar.bz2 rails-06f325f478fa1f9b8198a1e8ee56362b78a39121.zip |
Add multipart request parsing test with bracketed parameter key. References #8449.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | actionpack/test/controller/request_test.rb | 4 | ||||
-rw-r--r-- | actionpack/test/fixtures/multipart/bracketed_param | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 4a43091823..1e6f6db8d8 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -652,6 +652,10 @@ class MultipartRequestParameterParsingTest < Test::Unit::TestCase assert_equal({ 'foo' => 'bar' }, params) end + def test_bracketed_param + assert_equal({ 'foo' => { 'baz' => 'bar'}}, process('bracketed_param')) + end + def test_text_file params = process('text_file') assert_equal %w(file foo), params.keys.sort diff --git a/actionpack/test/fixtures/multipart/bracketed_param b/actionpack/test/fixtures/multipart/bracketed_param new file mode 100644 index 0000000000..096bd8a192 --- /dev/null +++ b/actionpack/test/fixtures/multipart/bracketed_param @@ -0,0 +1,5 @@ +--AaB03x
+Content-Disposition: form-data; name="foo[baz]"
+
+bar
+--AaB03x--
|