Add tests for simple match with namespace.
This commit is contained in:
parent
13d76b6170
commit
5a5760828b
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue