diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-25 17:31:50 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-25 17:31:50 +0000 |
commit | 0c8105277070c20590d22a0d4b8fc1f09ce981d9 (patch) | |
tree | cc03ec6f7da3f6b6b1ebd8c4a73f36276050b1a8 /test | |
parent | d99dc4070a925fabc050ae61c21c64548730a636 (diff) | |
download | redmine-0c8105277070c20590d22a0d4b8fc1f09ce981d9.tar.gz redmine-0c8105277070c20590d22a0d4b8fc1f09ce981d9.zip |
Adds a rake task to send reminders. An email is sent to each user with a list of the issues due in the next days, if any.
See @rake -D redmine:send_reminders@ for options.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1459 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/issues.yml | 2 | ||||
-rw-r--r-- | test/unit/mailer_test.rb | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/fixtures/issues.yml b/test/fixtures/issues.yml index c037624ae..9d3287c6f 100644 --- a/test/fixtures/issues.yml +++ b/test/fixtures/issues.yml @@ -42,7 +42,7 @@ issues_003: category_id:
description: Error 281 is encountered when saving a recipe
tracker_id: 1
- assigned_to_id:
+ assigned_to_id: 3
author_id: 2
status_id: 1
start_date: <%= 1.day.from_now.to_date.to_s(:db) %>
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 64648b94c..8cf6c1423 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -116,4 +116,13 @@ class MailerTest < Test::Unit::TestCase assert Mailer.deliver_register(token) end end + + def test_reminders + ActionMailer::Base.deliveries.clear + Mailer.reminders(:days => 42) + assert_equal 1, ActionMailer::Base.deliveries.size + 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 end |