aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/routing_test.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-15 23:35:38 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-15 23:36:03 +0100
commit5a5760828b998997048dc04ce3e83ecf50ae6e7b (patch)
tree59a9c5899881befcad6e35a716a38a676585f101 /actionpack/test/dispatch/routing_test.rb
parent13d76b6170886493369f94693e61364044e4316a (diff)
downloadrails-5a5760828b998997048dc04ce3e83ecf50ae6e7b.tar.gz
rails-5a5760828b998997048dc04ce3e83ecf50ae6e7b.tar.bz2
rails-5a5760828b998997048dc04ce3e83ecf50ae6e7b.zip
Add tests for simple match with namespace.
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 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")