diff options
Diffstat (limited to 'actionpack/test')
-rwxr-xr-x | actionpack/test/controller/cgi_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/controller/cgi_test.rb b/actionpack/test/controller/cgi_test.rb index 1d2888ad89..e7d44802a5 100755 --- a/actionpack/test/controller/cgi_test.rb +++ b/actionpack/test/controller/cgi_test.rb @@ -425,4 +425,16 @@ class CGIRequestTest < Test::Unit::TestCase assert_equal ["c84ace84796670c052c6ceb2451fb0f2"], alt_cookies["_session_id"] assert_equal ["yes"], alt_cookies["is_admin"] end + + def test_unbalanced_query_string_with_array + assert_equal( + {'location' => ["1", "2"], 'age_group' => ["2"]}, + CGIMethods.parse_query_parameters("location[]=1&location[]=2&age_group[]=2") + ) + assert_equal( + {'location' => ["1", "2"], 'age_group' => ["2"]}, + CGIMethods.parse_request_parameters({'location[]' => ["1", "2"], + 'age_group[]' => ["2"]}) + ) + end end |