From 39ae7025e84e35785e11d9fed059e74e70745ee3 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 11 Feb 2007 04:40:58 +0000 Subject: Don't test for hash sort order. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/hash_ext_test.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'activesupport') diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb index cc5d71447b..2946e849e0 100644 --- a/activesupport/test/core_ext/hash_ext_test.rb +++ b/activesupport/test/core_ext/hash_ext_test.rb @@ -532,19 +532,20 @@ class QueryTest < Test::Unit::TestCase def test_simple_conversion assert_equal 'a=10', {:a => 10}.to_query end - + def test_nested_conversion - assert_equal 'person[name]=Nicholas&person[login]=seckar', - {:person => {:name => 'Nicholas', :login => 'seckar'}}.to_query + expected = %w(person[name]=Nicholas person[login]=seckar) + actual = {:person => {:name => 'Nicholas', :login => 'seckar'}}.to_query + assert_equal expected.sort, actual.split('&').sort end - + def test_multiple_nested assert_equal 'account[person][id]=20&person[id]=10', {:person => {:id => 10}, :account => {:person => {:id => 20}}}.to_query end - + def test_array_values assert_equal 'person[id][]=10&person[id][]=20', {:person => {:id => [10, 20]}}.to_query end -end \ No newline at end of file +end -- cgit v1.2.3