diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-05 23:55:17 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-02-05 23:55:17 -0200 |
commit | ab51b285e2cccdc0cbdcd2daa04a7fd2fbb661ea (patch) | |
tree | 72e7e0a7dd85eb874cafb732b8217ef9ed36b51f /activesupport/test/core_ext | |
parent | d6e3fd775b8a0277b07b06c22c29f66dbafe6559 (diff) | |
download | rails-ab51b285e2cccdc0cbdcd2daa04a7fd2fbb661ea.tar.gz rails-ab51b285e2cccdc0cbdcd2daa04a7fd2fbb661ea.tar.bz2 rails-ab51b285e2cccdc0cbdcd2daa04a7fd2fbb661ea.zip |
Refatoring the method to avoid shot-circuit return
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/object/to_query_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/object/to_query_test.rb b/activesupport/test/core_ext/object/to_query_test.rb index 51275e36bf..a892471e0f 100644 --- a/activesupport/test/core_ext/object/to_query_test.rb +++ b/activesupport/test/core_ext/object/to_query_test.rb @@ -47,6 +47,8 @@ class ToQueryTest < ActiveSupport::TestCase end def test_nested_empty_hash + assert_equal '', + {}.to_query assert_query_equal 'a=1&b%5Bc%5D=3&b%5Bd%5D=', { a: 1, b: { c: 3, d: {} } } assert_query_equal 'b%5Bc%5D=false&b%5Be%5D=&b%5Bf%5D=&p=12', |