aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-02-11 04:40:58 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-02-11 04:40:58 +0000
commit39ae7025e84e35785e11d9fed059e74e70745ee3 (patch)
treef6aef8066923df0e0512cc87e45b60a560860cbf /activesupport
parenteb2dad2fe56b40b698d1273dd04bba1dee97d9b7 (diff)
downloadrails-39ae7025e84e35785e11d9fed059e74e70745ee3.tar.gz
rails-39ae7025e84e35785e11d9fed059e74e70745ee3.tar.bz2
rails-39ae7025e84e35785e11d9fed059e74e70745ee3.zip
Don't test for hash sort order.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb13
1 files changed, 7 insertions, 6 deletions
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