mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
This patch removes deprecated catch-all routes from AM
It also removes a monkey patch from AM::Base
This commit is contained in:
parent
0a829f7db1
commit
fefcb36811
1 changed files with 7 additions and 17 deletions
|
@ -8,11 +8,16 @@ end
|
|||
|
||||
AppRoutes = ActionDispatch::Routing::RouteSet.new
|
||||
|
||||
class ActionMailer::Base
|
||||
include AppRoutes.url_helpers
|
||||
AppRoutes.draw do
|
||||
get "/welcome" => "foo#bar", as: "welcome"
|
||||
get "/dummy_model" => "foo#baz", as: "dummy_model"
|
||||
get "/welcome/greeting", to: "welcome#greeting"
|
||||
get "/a/b(/:id)", to: "a#b"
|
||||
end
|
||||
|
||||
class UrlTestMailer < ActionMailer::Base
|
||||
include AppRoutes.url_helpers
|
||||
|
||||
default_url_options[:host] = "www.basecamphq.com"
|
||||
|
||||
configure do |c|
|
||||
|
@ -80,14 +85,6 @@ class ActionMailerUrlTest < ActionMailer::TestCase
|
|||
def test_url_for
|
||||
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/"
|
||||
|
||||
|
@ -111,13 +108,6 @@ class ActionMailerUrlTest < ActionMailer::TestCase
|
|||
def test_signed_up_with_url
|
||||
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
|
||||
expected.subject = "[Signed up] Welcome #{@recipient}"
|
||||
|
|
Loading…
Reference in a new issue