aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@github.com>2018-09-25 09:27:56 -0700
committerGitHub <noreply@github.com>2018-09-25 09:27:56 -0700
commitd34bd0d2d55e33c757abd55fdd07ff575f68f185 (patch)
tree707347b74f4b6181c42a83529ba7c34f4bf75f1a /actionmailer
parent6d698fdb070f4134c1795e8befb4e4c5e29a682f (diff)
parentfefcb36811f56d3d0c761b8a1d7b60ccd89defdb (diff)
downloadrails-d34bd0d2d55e33c757abd55fdd07ff575f68f185.tar.gz
rails-d34bd0d2d55e33c757abd55fdd07ff575f68f185.tar.bz2
rails-d34bd0d2d55e33c757abd55fdd07ff575f68f185.zip
Merge pull request #33974 from rails/remove-catch-all-from-am
This patch removes deprecated catch-all routes from AM
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/test/url_test.rb24
1 files changed, 7 insertions, 17 deletions
diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb
index 3c940bc969..a926663a9f 100644
--- a/actionmailer/test/url_test.rb
+++ b/actionmailer/test/url_test.rb
@@ -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}"