1
0
Fork 0
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:
Jeremy Kemper 2007-05-24 23:37:37 +00:00
parent 74d1512b99
commit 06f325f478
2 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -0,0 +1,5 @@
--AaB03x
Content-Disposition: form-data; name="foo[baz]"
bar
--AaB03x--