Permalink
Browse files

Don't test for hash sort order.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent eb2dad2 commit 39ae7025e84e35785e11d9fed059e74e70745ee3 @jeremy jeremy committed Feb 11, 2007
Showing with 7 additions and 6 deletions.
  1. +7 −6 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
+end

0 comments on commit 39ae702

Please sign in to comment.