aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-10 18:42:45 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-10 18:42:45 +0100
commit8d72ba51bac75e44ca86fafbcab54eab7a355d29 (patch)
treeee8f6f0d8b7e52f70634b5302f28f52de1a3462e /actionpack/test/dispatch/routing_test.rb
parent36969c6ecd69fc285bf0267805152319a4b71ceb (diff)
downloadrails-8d72ba51bac75e44ca86fafbcab54eab7a355d29.tar.gz
rails-8d72ba51bac75e44ca86fafbcab54eab7a355d29.tar.bz2
rails-8d72ba51bac75e44ca86fafbcab54eab7a355d29.zip
Ensure nested namespaces work as expected.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index 952cdb1098..bcd6a5278c 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -99,6 +99,10 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
namespace :account do
resource :subscription, :credit, :credit_card
+
+ namespace :admin do
+ resource :subscription
+ end
end
controller :articles do
@@ -445,6 +449,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
end
end
+ def test_nested_namespace
+ with_test_routes do
+ get '/account/admin/subscription'
+ assert_equal 'account/admin/subscriptions#show', @response.body
+ assert_equal '/account/admin/subscription', account_admin_subscription_path
+ end
+ end
+
def test_articles_with_id
with_test_routes do
get '/articles/rails/1'