mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
74d1512b99
commit
06f325f478
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
5
actionpack/test/fixtures/multipart/bracketed_param
vendored
Normal file
5
actionpack/test/fixtures/multipart/bracketed_param
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
--AaB03x
|
||||
Content-Disposition: form-data; name="foo[baz]"
|
||||
|
||||
bar
|
||||
--AaB03x--
|
Loading…
Reference in a new issue