From 5a5760828b998997048dc04ce3e83ecf50ae6e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 15 Jan 2010 23:35:38 +0100 Subject: Add tests for simple match with namespace. --- actionpack/test/dispatch/routing_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'actionpack/test/dispatch') diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 890895a330..5845c791a0 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -115,6 +115,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest match 'articles/:year/:month/:day/:title', :to => "articles#show", :as => :article namespace :account do + match 'description', :to => "account#description", :as => "description" resource :subscription, :credit, :credit_card namespace :admin do @@ -650,6 +651,15 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest self.host = previous_host end + def test_normalize_namespaced_matches + with_test_routes do + assert_equal '/account/description', account_description_path + + get '/account/description' + assert_equal 'account#description', @response.body + end + end + def test_optional_scoped_path with_test_routes do assert_equal '/en/descriptions', descriptions_path("en") -- cgit v1.2.3