Permalink
Browse files

Add a test which ensures namespaced roots.

  • Loading branch information...
1 parent 4d177d4 commit 22c0390085eed6fa2c4b78e1a9465ae3b7861568 @josevalim josevalim committed Feb 6, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 actionpack/test/dispatch/routing_test.rb
@@ -118,6 +118,8 @@ def self.matches?(request)
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 @@ def test_normalize_namespaced_matches
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")

0 comments on commit 22c0390

Please sign in to comment.