aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/routing_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 5c46f9b971..c4e402afd3 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -144,6 +144,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
resources :sheep
+ resources :clients do
+ namespace :google do
+ resource :account
+ end
+ end
+
match 'sprockets.js' => ::TestRoutingMapper::SprocketsApp
match 'people/:id/update', :to => 'people#update', :as => :update_person
@@ -813,6 +819,15 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
assert_equal '/account/admin/subscription', account_admin_subscription_path
end
end
+
+ def test_namespace_nested_in_resources
+ with_test_routes do
+ get '/clients/1/google/account'
+ assert_equal '/clients/1/google/account', client_google_account_path(1)
+
+ assert_equal 'google/accounts#show', @response.body
+ end
+ end
def test_articles_with_id
with_test_routes do