diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-05-14 09:34:33 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-15 09:38:32 +0200 |
commit | 7ffe76046ad142377bf6b286f4477b09513d1e37 (patch) | |
tree | 434ccfa88cd3b6df896004d2d89749b29f988cfa /activeresource/test/cases | |
parent | d18a2742e01d195eb2d228207062aff49f7eb854 (diff) | |
download | rails-7ffe76046ad142377bf6b286f4477b09513d1e37.tar.gz rails-7ffe76046ad142377bf6b286f4477b09513d1e37.tar.bz2 rails-7ffe76046ad142377bf6b286f4477b09513d1e37.zip |
ActiveResource shouldn't consider modules in the path
[#4529 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activeresource/test/cases')
-rw-r--r-- | activeresource/test/cases/base_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activeresource/test/cases/base_test.rb b/activeresource/test/cases/base_test.rb index 5df1f411a4..4e21e84596 100644 --- a/activeresource/test/cases/base_test.rb +++ b/activeresource/test/cases/base_test.rb @@ -2,6 +2,7 @@ require 'abstract_unit' require "fixtures/person" require "fixtures/customer" require "fixtures/street_address" +require "fixtures/sound" require "fixtures/beast" require "fixtures/proxy" require 'active_support/json' @@ -563,6 +564,10 @@ class BaseTest < Test::Unit::TestCase assert_equal '/people/Greg/addresses/1.xml', StreetAddress.element_path(1, 'person_id' => 'Greg') end + def test_module_element_path + assert_equal '/sounds/1.xml', Asset::Sound.element_path(1) + end + def test_custom_element_path_with_redefined_to_param Person.module_eval do alias_method :original_to_param_element_path, :to_param |