aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
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 /activeresource
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 'activeresource')
-rw-r--r--activeresource/test/cases/base_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activeresource/test/cases/base_test.rb b/activeresource/test/cases/base_test.rb
index 4d036d73cc..a176c037d5 100644
--- a/activeresource/test/cases/base_test.rb
+++ b/activeresource/test/cases/base_test.rb
@@ -6,6 +6,7 @@ require "fixtures/sound"
require "fixtures/beast"
require "fixtures/proxy"
require 'active_support/json'
+require 'active_support/ordered_hash'
require 'active_support/core_ext/hash/conversions'
require 'mocha'
@@ -555,7 +556,7 @@ class BaseTest < Test::Unit::TestCase
assert_equal '/people.xml?name[]=bob&name[]=your+uncle%2Bme&name[]=&name[]=false', Person.collection_path(:name => ['bob', 'your uncle+me', nil, false])
- assert_equal '/people.xml?struct[a][]=2&struct[a][]=1&struct[b]=fred', Person.collection_path(:struct => {:a => [2,1], 'b' => 'fred'})
+ assert_equal '/people.xml?struct[a][]=2&struct[a][]=1&struct[b]=fred', Person.collection_path(:struct => ActiveSupport::OrderedHash[:a, [2,1], 'b', 'fred'])
end
def test_custom_element_path