aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-02-06 11:52:28 +0100
committerJosé Valim <jose.valim@gmail.com>2010-02-06 11:52:28 +0100
commit22c0390085eed6fa2c4b78e1a9465ae3b7861568 (patch)
tree7133916a20ee56111e8de3a4e92162e33f96006d /actionpack/test/dispatch/routing_test.rb
parent4d177d46d95d77e06c88241c3bf809945fbd3a92 (diff)
downloadrails-22c0390085eed6fa2c4b78e1a9465ae3b7861568.tar.gz
rails-22c0390085eed6fa2c4b78e1a9465ae3b7861568.tar.bz2
rails-22c0390085eed6fa2c4b78e1a9465ae3b7861568.zip
Add a test which ensures namespaced roots.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r--actionpack/test/dispatch/routing_test.rb10
1 files changed, 10 insertions, 0 deletions
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")