aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-06-10 22:44:54 -0500
committerAaron Patterson <aaron.patterson@gmail.com>2012-06-12 14:07:29 -0700
commit24894fc13037e849bceb3e1999bf41326f5d8077 (patch)
tree1fbf14b298a629ff0b80b9f78b78667e14c6bceb /actionpack/test/dispatch
parent65d584c35b97c57079cb788e375685dd5e2e787c (diff)
downloadrails-24894fc13037e849bceb3e1999bf41326f5d8077.tar.gz
rails-24894fc13037e849bceb3e1999bf41326f5d8077.tar.bz2
rails-24894fc13037e849bceb3e1999bf41326f5d8077.zip
Array parameters should not contain nil values.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/request/query_string_parsing_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request/query_string_parsing_test.rb b/actionpack/test/dispatch/request/query_string_parsing_test.rb
index 6ea66f9d32..bf7cb9914c 100644
--- a/actionpack/test/dispatch/request/query_string_parsing_test.rb
+++ b/actionpack/test/dispatch/request/query_string_parsing_test.rb
@@ -89,6 +89,10 @@ class QueryStringParsingTest < ActionDispatch::IntegrationTest
assert_parses({"action"=>{"foo"=>[{"bar"=>nil}]}}, "action[foo][][bar]")
end
+ def test_array_parses_without_nil
+ assert_parses({"action" => ['1']}, "action[]=1&action[]")
+ end
+
test "query string with empty key" do
assert_parses(
{ "action" => "create_customer", "full_name" => "David Heinemeier Hansson" },