aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-07-21 21:00:11 -0300
committerJeremy Kemper <jeremy@bitsweat.net>2010-07-21 17:34:43 -0700
commit30df88ae06182a72ae7f959dce8d8df4a7adb99a (patch)
treecc30f773dd87b99ba400cf2220d53a009559dfcf /activesupport/test
parenta1e795f554e07476f1084a0c76cb8b033d1d0b0c (diff)
downloadrails-30df88ae06182a72ae7f959dce8d8df4a7adb99a.tar.gz
rails-30df88ae06182a72ae7f959dce8d8df4a7adb99a.tar.bz2
rails-30df88ae06182a72ae7f959dce8d8df4a7adb99a.zip
These tests are trusting in the order of the elements so use OrderedHash instead of Hash
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/object/to_query_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/object/to_query_test.rb b/activesupport/test/core_ext/object/to_query_test.rb
index 4d655913cc..e28b4cd493 100644
--- a/activesupport/test/core_ext/object/to_query_test.rb
+++ b/activesupport/test/core_ext/object/to_query_test.rb
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/ordered_hash'
require 'active_support/core_ext/object/to_query'
class ToQueryTest < Test::Unit::TestCase
@@ -18,12 +19,12 @@ class ToQueryTest < Test::Unit::TestCase
def test_nested_conversion
assert_query_equal 'person[login]=seckar&person[name]=Nicholas',
- :person => {:name => 'Nicholas', :login => 'seckar'}
+ :person => ActiveSupport::OrderedHash[:login, 'seckar', :name, 'Nicholas']
end
def test_multiple_nested
assert_query_equal 'account[person][id]=20&person[id]=10',
- :person => {:id => 10}, :account => {:person => {:id => 20}}
+ ActiveSupport::OrderedHash[:account, {:person => {:id => 20}}, :person, {:id => 10}]
end
def test_array_values