diff options
author | George Claghorn <george.claghorn@gmail.com> | 2015-01-08 09:41:22 -0500 |
---|---|---|
committer | George Claghorn <george.claghorn@gmail.com> | 2015-01-08 09:41:22 -0500 |
commit | 3f17fbd68d17e9e51fbd39be772cec9f176ac08f (patch) | |
tree | fa56fcc84dee2a958c01bcd300fea756c6296e35 /actionmailer/CHANGELOG.md | |
parent | 91e31e82feaf0ba7609c02b1a3508f0506214404 (diff) | |
download | rails-3f17fbd68d17e9e51fbd39be772cec9f176ac08f.tar.gz rails-3f17fbd68d17e9e51fbd39be772cec9f176ac08f.tar.bz2 rails-3f17fbd68d17e9e51fbd39be772cec9f176ac08f.zip |
Add assert_enqueued_emails and assert_no_enqueued_emails
Diffstat (limited to 'actionmailer/CHANGELOG.md')
-rw-r--r-- | actionmailer/CHANGELOG.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/actionmailer/CHANGELOG.md b/actionmailer/CHANGELOG.md index 79cf09c0db..008760f2fc 100644 --- a/actionmailer/CHANGELOG.md +++ b/actionmailer/CHANGELOG.md @@ -1,3 +1,20 @@ +* Add `assert_enqueued_emails` and `assert_no_enqueued_emails`. + + def test_emails + assert_enqueued_emails 2 do + ContactMailer.welcome.deliver_later + ContactMailer.welcome.deliver_later + end + end + + def test_no_emails + assert_no_enqueued_emails do + # No emails enqueued here + end + end + + *George Claghorn* + * Add `_mailer` suffix to mailers created via generator, following the same naming convention used in controllers and jobs. |