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,8 +25,10 @@ end
|
|||
class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
|
||||
Routes = ActionDispatch::Routing::RouteSet.new
|
||||
Routes.draw do
|
||||
ActiveSupport::Deprecation.silence do
|
||||
get ':controller(/:action(/:id))'
|
||||
end
|
||||
end
|
||||
|
||||
class RoutedRackApp
|
||||
attr_reader :routes
|
||||
|
|
|
@ -79,10 +79,12 @@ class ActionMailerUrlTest < ActionMailer::TestCase
|
|||
UrlTestMailer.delivery_method = :test
|
||||
|
||||
AppRoutes.draw do
|
||||
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
|
||||
assert_url_for 'http://foo/', 'http://foo/'
|
||||
|
@ -108,9 +110,11 @@ class ActionMailerUrlTest < ActionMailer::TestCase
|
|||
UrlTestMailer.delivery_method = :test
|
||||
|
||||
AppRoutes.draw do
|
||||
ActiveSupport::Deprecation.silence do
|
||||
get ':controller(/:action(/:id))'
|
||||
get '/welcome' => "foo#bar", as: "welcome"
|
||||
end
|
||||
end
|
||||
|
||||
expected = new_mail
|
||||
expected.to = @recipient
|
||||
|
|
Loading…
Reference in a new issue