summary refs log tree commit
path: root/test/spec_utils.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/spec_utils.rb')
-rw-r--r--test/spec_utils.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/spec_utils.rb b/test/spec_utils.rb
index 4b989db7..4ee2d03f 100644
--- a/test/spec_utils.rb
+++ b/test/spec_utils.rb
@@ -257,6 +257,14 @@ describe Rack::Utils do
       should.equal "foo[]="
     Rack::Utils.build_nested_query("foo" => ["bar"]).
       should.equal "foo[]=bar"
+    Rack::Utils.build_nested_query('foo' => []).
+      should.equal ''
+    Rack::Utils.build_nested_query('foo' => {}).
+      should.equal ''
+    Rack::Utils.build_nested_query('foo' => 'bar', 'baz' => []).
+      should.equal 'foo=bar'
+    Rack::Utils.build_nested_query('foo' => 'bar', 'baz' => {}).
+      should.equal 'foo=bar'
 
     # The ordering of the output query string is unpredictable with 1.8's
     # unordered hash. Test that build_nested_query performs the inverse