aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/resources_test.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index d0c144d233..3dc2429dae 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -1029,7 +1029,9 @@ class ResourcesTest < ActionController::TestCase
def test_resource_has_only_collection_action
with_routing do |set|
set.draw do
- resources :products, :except => :all, :collection => { :sale => :get }
+ resources :products, :except => :all do
+ get :sale, :on => :collection
+ end
end
assert_resource_allowed_routes('products', {}, { :id => '1' }, [], [:index, :new, :create, :show, :edit, :update, :destroy])
@@ -1043,7 +1045,9 @@ class ResourcesTest < ActionController::TestCase
def test_resource_has_only_member_action
with_routing do |set|
set.draw do
- resources :products, :except => :all, :member => { :preview => :get }
+ resources :products, :except => :all do
+ get :preview, :on => :member
+ end
end
assert_resource_allowed_routes('products', {}, { :id => '1' }, [], [:index, :new, :create, :show, :edit, :update, :destroy])
@@ -1076,7 +1080,9 @@ class ResourcesTest < ActionController::TestCase
with_routing do |set|
set.draw do
resources :products, :only => [:index, :show] do
- resources :images, :member => { :thumbnail => :get }, :only => :show
+ resources :images, :only => :show do
+ get :thumbnail, :on => :member
+ end
end
end