mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Add more cases to previous commit [#4394 state:resolved]
This commit is contained in:
@@ -680,7 +680,7 @@ module ActionDispatch
|
||||
end
|
||||
|
||||
def namespace(path)
|
||||
if @scope[:scope_level] == :resources
|
||||
if resource_scope?
|
||||
nested { super }
|
||||
else
|
||||
super
|
||||
|
||||
@@ -146,7 +146,11 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
|
||||
|
||||
resources :clients do
|
||||
namespace :google do
|
||||
resource :account
|
||||
resource :account do
|
||||
namespace :secret do
|
||||
resource :info
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -824,8 +828,11 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
|
||||
with_test_routes do
|
||||
get '/clients/1/google/account'
|
||||
assert_equal '/clients/1/google/account', client_google_account_path(1)
|
||||
|
||||
assert_equal 'google/accounts#show', @response.body
|
||||
|
||||
get '/clients/1/google/account/secret/info'
|
||||
assert_equal '/clients/1/google/account/secret/info', client_google_account_secret_info_path(1)
|
||||
assert_equal 'google/secret/infos#show', @response.body
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user