diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-15 23:35:38 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-15 23:36:03 +0100 |
commit | 5a5760828b998997048dc04ce3e83ecf50ae6e7b (patch) | |
tree | 59a9c5899881befcad6e35a716a38a676585f101 /actionpack/test/dispatch | |
parent | 13d76b6170886493369f94693e61364044e4316a (diff) | |
download | rails-5a5760828b998997048dc04ce3e83ecf50ae6e7b.tar.gz rails-5a5760828b998997048dc04ce3e83ecf50ae6e7b.tar.bz2 rails-5a5760828b998997048dc04ce3e83ecf50ae6e7b.zip |
Add tests for simple match with namespace.
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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") |