Skip to content

Commit

Permalink
Add multipart request parsing test with bracketed parameter key. Refe…
Browse files Browse the repository at this point in the history
…rences #8449.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed May 24, 2007
1 parent 74d1512 commit 06f325f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actionpack/test/controller/request_test.rb
Expand Up @@ -652,6 +652,10 @@ def test_single_parameter
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
Expand Down
5 changes: 5 additions & 0 deletions actionpack/test/fixtures/multipart/bracketed_param
@@ -0,0 +1,5 @@
--AaB03x
Content-Disposition: form-data; name="foo[baz]"

bar
--AaB03x--

0 comments on commit 06f325f

Please sign in to comment.