diff options
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index a5932d325..77bcb36f6 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -355,6 +355,16 @@ class MailerTest < ActiveSupport::TestCase assert_equal '1 issue(s) due in the next 42 days', mail.subject end + def test_reminders_for_users + Mailer.reminders(:days => 42, :users => ['5']) + assert_equal 0, ActionMailer::Base.deliveries.size # No mail for dlopper + Mailer.reminders(:days => 42, :users => ['3']) + assert_equal 1, ActionMailer::Base.deliveries.size # No mail for dlopper + mail = ActionMailer::Base.deliveries.last + assert mail.bcc.include?('dlopper@somenet.foo') + assert mail.body.include?('Bug #3: Error 281 when updating a recipe') + end + def last_email mail = ActionMailer::Base.deliveries.last assert_not_nil mail |