mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Suppress warnings
"Using a dynamic :controller (or :action) segment in a route is deprecated"
by 6520ea5f7e
(#23980).
This commit is contained in:
parent
7e976fd84d
commit
5aa6c85c3b
2 changed files with 12 additions and 6 deletions
|
@ -25,7 +25,9 @@ end
|
|||
class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
|
||||
Routes = ActionDispatch::Routing::RouteSet.new
|
||||
Routes.draw do
|
||||
get ':controller(/:action(/:id))'
|
||||
ActiveSupport::Deprecation.silence do
|
||||
get ':controller(/:action(/:id))'
|
||||
end
|
||||
end
|
||||
|
||||
class RoutedRackApp
|
||||
|
|
|
@ -79,9 +79,11 @@ class ActionMailerUrlTest < ActionMailer::TestCase
|
|||
UrlTestMailer.delivery_method = :test
|
||||
|
||||
AppRoutes.draw do
|
||||
get ':controller(/:action(/:id))'
|
||||
get '/welcome' => 'foo#bar', as: 'welcome'
|
||||
get '/dummy_model' => 'foo#baz', as: 'dummy_model'
|
||||
ActiveSupport::Deprecation.silence do
|
||||
get ':controller(/:action(/:id))'
|
||||
get '/welcome' => 'foo#bar', as: 'welcome'
|
||||
get '/dummy_model' => 'foo#baz', as: 'dummy_model'
|
||||
end
|
||||
end
|
||||
|
||||
# string
|
||||
|
@ -108,8 +110,10 @@ class ActionMailerUrlTest < ActionMailer::TestCase
|
|||
UrlTestMailer.delivery_method = :test
|
||||
|
||||
AppRoutes.draw do
|
||||
get ':controller(/:action(/:id))'
|
||||
get '/welcome' => "foo#bar", as: "welcome"
|
||||
ActiveSupport::Deprecation.silence do
|
||||
get ':controller(/:action(/:id))'
|
||||
get '/welcome' => "foo#bar", as: "welcome"
|
||||
end
|
||||
end
|
||||
|
||||
expected = new_mail
|
||||
|
|
Loading…
Reference in a new issue