aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/log_subscriber_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/log_subscriber_test.rb')
-rw-r--r--actionmailer/test/log_subscriber_test.rb14
1 files changed, 4 insertions, 10 deletions
diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb
index ba9b4d6500..5f52a1bd69 100644
--- a/actionmailer/test/log_subscriber_test.rb
+++ b/actionmailer/test/log_subscriber_test.rb
@@ -1,4 +1,5 @@
require "abstract_unit"
+require 'mailers/base_mailer'
require "active_support/log_subscriber/test_helper"
require "action_mailer/log_subscriber"
@@ -11,13 +12,6 @@ class AMLogSubscriberTest < ActionMailer::TestCase
end
class TestMailer < ActionMailer::Base
- def basic
- recipients "somewhere@example.com"
- subject "basic"
- from "basic@example.com"
- body "Hello world"
- end
-
def receive(mail)
# Do nothing
end
@@ -28,12 +22,12 @@ class AMLogSubscriberTest < ActionMailer::TestCase
end
def test_deliver_is_notified
- TestMailer.basic.deliver
+ BaseMailer.welcome.deliver
wait
assert_equal(1, @logger.logged(:info).size)
- assert_match(/Sent mail to somewhere@example.com/, @logger.logged(:info).first)
+ assert_match(/Sent mail to system@test.lindsaar.net/, @logger.logged(:info).first)
assert_equal(1, @logger.logged(:debug).size)
- assert_match(/Hello world/, @logger.logged(:debug).first)
+ assert_match(/Welcome/, @logger.logged(:debug).first)
end
def test_receive_is_notified