diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2010-08-24 22:16:34 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-24 21:15:13 -0300 |
commit | 1847d33b4bc776fbd4746c06db41965744377ed6 (patch) | |
tree | 0de3f1d0c7b83aa8125a9af2735e39b05643f9e1 /actionpack/test | |
parent | 3ac6646d6f9ad978e8f245883b6227499785bf3e (diff) | |
download | rails-1847d33b4bc776fbd4746c06db41965744377ed6.tar.gz rails-1847d33b4bc776fbd4746c06db41965744377ed6.tar.bz2 rails-1847d33b4bc776fbd4746c06db41965744377ed6.zip |
Use nested scope for routes defined at the :resources scope level (as in Rails 2.3)
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 5b2547e700..a4b8fafa78 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -231,6 +231,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest get "inactive", :on => :collection post "deactivate", :on => :member get "old", :on => :collection, :as => :stale + get "export" end namespace :api do @@ -2091,6 +2092,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert_equal '/customers/1/invoices/aged/3', aged_customer_invoices_path(:customer_id => '1', :months => '3') end + def test_route_defined_in_resources_scope_level + get '/customers/1/export' + assert_equal 'customers#export', @response.body + assert_equal '/customers/1/export', customer_export_path(:customer_id => '1') + end + private def with_test_routes yield |