aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/hash_ext_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/core_ext/hash_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb41
1 files changed, 0 insertions, 41 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index eb4c37aaf0..4642bb1330 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -899,42 +899,6 @@ class HashToXmlTest < Test::Unit::TestCase
# :builder, etc, shouldn't be added to options
assert_equal({:skip_instruct => true}, options)
end
-end
-
-class QueryTest < Test::Unit::TestCase
- def test_simple_conversion
- assert_query_equal 'a=10', :a => 10
- end
-
- def test_cgi_escaping
- assert_query_equal 'a%3Ab=c+d', 'a:b' => 'c d'
- end
-
- def test_nil_parameter_value
- empty = Object.new
- def empty.to_param; nil end
- assert_query_equal 'a=', 'a' => empty
- end
-
- def test_nested_conversion
- assert_query_equal 'person%5Blogin%5D=seckar&person%5Bname%5D=Nicholas',
- :person => {:name => 'Nicholas', :login => 'seckar'}
- end
-
- def test_multiple_nested
- assert_query_equal 'account%5Bperson%5D%5Bid%5D=20&person%5Bid%5D=10',
- :person => {:id => 10}, :account => {:person => {:id => 20}}
- end
-
- def test_array_values
- assert_query_equal 'person%5Bid%5D%5B%5D=10&person%5Bid%5D%5B%5D=20',
- :person => {:id => [10, 20]}
- end
-
- def test_array_values_are_not_sorted
- assert_query_equal 'person%5Bid%5D%5B%5D=20&person%5Bid%5D%5B%5D=10',
- :person => {:id => [20, 10]}
- end
def test_expansion_count_is_limited
expected = {
@@ -962,9 +926,4 @@ class QueryTest < Test::Unit::TestCase
Hash.from_xml(attack_xml)
end
end
-
- private
- def assert_query_equal(expected, actual, message = nil)
- assert_equal expected.split('&'), actual.to_query.split('&')
- end
end