From 22c0390085eed6fa2c4b78e1a9465ae3b7861568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 6 Feb 2010 11:52:28 +0100 Subject: Add a test which ensures namespaced roots. --- actionpack/test/dispatch/routing_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index dfe824fd70..bcb97e4ae0 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -118,6 +118,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest match 'description', :to => "account#description", :as => "description" resource :subscription, :credit, :credit_card + root :to => "account#index" + namespace :admin do resource :subscription end @@ -659,6 +661,14 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_namespaced_roots + with_test_routes do + assert_equal '/account', account_root_path + get '/account' + assert_equal 'account#index', @response.body + end + end + def test_optional_scoped_root with_test_routes do assert_equal '/en', root_path("en") -- cgit v1.2.3