aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test
diff options
context:
space:
mode:
authorGaston Ramos <ramos.gaston@gmail.com>2010-09-13 17:33:58 -0300
committerGaston Ramos <ramos.gaston@gmail.com>2010-09-27 15:25:33 -0300
commit823a8e6e66b6e63583f569fdbc2e9cffa9430bf8 (patch)
tree8e393cc544a64717f56ece5b0ac5111e4ea28199 /activeresource/test
parent9363931f349d783058688c2c14a31856116125e0 (diff)
downloadrails-823a8e6e66b6e63583f569fdbc2e9cffa9430bf8.tar.gz
rails-823a8e6e66b6e63583f569fdbc2e9cffa9430bf8.tar.bz2
rails-823a8e6e66b6e63583f569fdbc2e9cffa9430bf8.zip
- check prefix options in collection_path
Diffstat (limited to 'activeresource/test')
-rw-r--r--activeresource/test/cases/base_test.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/activeresource/test/cases/base_test.rb b/activeresource/test/cases/base_test.rb
index f813ce2181..18c732b2ab 100644
--- a/activeresource/test/cases/base_test.rb
+++ b/activeresource/test/cases/base_test.rb
@@ -477,7 +477,7 @@ class BaseTest < Test::Unit::TestCase
def test_custom_element_path_without_required_prefix_param
assert_raise ActiveResource::MissingPrefixParam do
- assert_equal '/people/1/addresses/1.xml', StreetAddress.element_path(1)
+ StreetAddress.element_path(1)
end
end
@@ -519,6 +519,12 @@ class BaseTest < Test::Unit::TestCase
assert_equal '/people/1/addresses/1.xml?type=work', StreetAddress.element_path(1, {:person_id => 1}, {:type => 'work'})
end
+ def test_custom_collection_path_without_required_prefix_param
+ assert_raise ActiveResource::MissingPrefixParam do
+ StreetAddress.collection_path
+ end
+ end
+
def test_custom_collection_path
assert_equal '/people/1/addresses.xml', StreetAddress.collection_path(:person_id => 1)
assert_equal '/people/1/addresses.xml', StreetAddress.collection_path('person_id' => 1)