diff options
author | Daniel Schierbeck <dasch@zendesk.com> | 2013-10-16 10:32:06 +0200 |
---|---|---|
committer | Daniel Schierbeck <dasch@zendesk.com> | 2013-10-20 15:21:15 +0200 |
commit | 8f0c5e00ff61cc2f61acedfb35de756bd0e95437 (patch) | |
tree | 05b7ace2d4938c8376cdc3580526e279f930f4b8 /actionmailer/test | |
parent | cc8d14827d117ed7da7a17c4a057a8e5f71625ca (diff) | |
download | rails-8f0c5e00ff61cc2f61acedfb35de756bd0e95437.tar.gz rails-8f0c5e00ff61cc2f61acedfb35de756bd0e95437.tar.bz2 rails-8f0c5e00ff61cc2f61acedfb35de756bd0e95437.zip |
Instrument the generation of Action Mailer messages
The processing of outbound mail is instrumented with the key
`process.action_mailer`. The payload includes the mailer name as well as
the mailer method.
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/log_subscriber_test.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/actionmailer/test/log_subscriber_test.rb b/actionmailer/test/log_subscriber_test.rb index 5f52a1bd69..5f0bee88fd 100644 --- a/actionmailer/test/log_subscriber_test.rb +++ b/actionmailer/test/log_subscriber_test.rb @@ -24,10 +24,13 @@ class AMLogSubscriberTest < ActionMailer::TestCase def test_deliver_is_notified BaseMailer.welcome.deliver wait + assert_equal(1, @logger.logged(:info).size) assert_match(/Sent mail to system@test.lindsaar.net/, @logger.logged(:info).first) - assert_equal(1, @logger.logged(:debug).size) - assert_match(/Welcome/, @logger.logged(:debug).first) + + assert_equal(2, @logger.logged(:debug).size) + assert_match(/BaseMailer#welcome: processed outbound mail in [\d.]+ms/, @logger.logged(:debug).first) + assert_match(/Welcome/, @logger.logged(:debug).second) end def test_receive_is_notified @@ -39,4 +42,4 @@ class AMLogSubscriberTest < ActionMailer::TestCase assert_equal(1, @logger.logged(:debug).size) assert_match(/Jamis/, @logger.logged(:debug).first) end -end
\ No newline at end of file +end |