Skip to content

Commit

Permalink
replaced active support ordered hash to ruby hash on active resource
Browse files Browse the repository at this point in the history
  • Loading branch information
prasath committed Feb 8, 2012
1 parent 828d29c commit 7c44491
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions activeresource/test/cases/base_test.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
require "fixtures/address" require "fixtures/address"
require "fixtures/subscription_plan" require "fixtures/subscription_plan"
require 'active_support/json' require 'active_support/json'
require 'active_support/ordered_hash'
require 'active_support/core_ext/hash/conversions' require 'active_support/core_ext/hash/conversions'
require 'mocha' require 'mocha'


Expand Down Expand Up @@ -464,8 +463,7 @@ def test_collection_path_with_parameters
assert Person.collection_path(:gender => 'male', :student => true).include?('student=true') assert Person.collection_path(:gender => 'male', :student => true).include?('student=true')


assert_equal '/people.json?name%5B%5D=bob&name%5B%5D=your+uncle%2Bme&name%5B%5D=&name%5B%5D=false', Person.collection_path(:name => ['bob', 'your uncle+me', nil, false]) assert_equal '/people.json?name%5B%5D=bob&name%5B%5D=your+uncle%2Bme&name%5B%5D=&name%5B%5D=false', Person.collection_path(:name => ['bob', 'your uncle+me', nil, false])

assert_equal '/people.json?struct%5Ba%5D%5B%5D=2&struct%5Ba%5D%5B%5D=1&struct%5Bb%5D=fred', Person.collection_path(:struct => {:a => [2,1], 'b' => 'fred'})
assert_equal '/people.json?struct%5Ba%5D%5B%5D=2&struct%5Ba%5D%5B%5D=1&struct%5Bb%5D=fred', Person.collection_path(:struct => ActiveSupport::OrderedHash[:a, [2,1], 'b', 'fred'])
end end


def test_custom_element_path def test_custom_element_path
Expand Down

0 comments on commit 7c44491

Please sign in to comment.