diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-09 11:02:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-09 11:02:13 +0000 |
commit | 197a14a82e3e82bd0b5a057ffc397c1a81922453 (patch) | |
tree | 78b833f7012ff38f8e2fadea101ccd5185780376 /test/unit/mailer_test.rb | |
parent | ff86c37ed33029e25f5cfd90fce2e447471847e3 (diff) | |
download | redmine-197a14a82e3e82bd0b5a057ffc397c1a81922453.tar.gz redmine-197a14a82e3e82bd0b5a057ffc397c1a81922453.zip |
Fixed that the reminder email excludes issues assigned to groups (#11723).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10335 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index e95aa449a..efde01f5c 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -508,6 +508,27 @@ class MailerTest < ActiveSupport::TestCase assert_mail_body_match 'Bug #3: Error 281 when updating a recipe', mail end + def test_reminder_should_include_issues_assigned_to_groups + with_settings :default_language => 'en' do + group = Group.generate! + group.users << User.find(2) + group.users << User.find(3) + + Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 1, + :subject => 'Assigned to group', :assigned_to => group, + :due_date => 5.days.from_now, + :author_id => 2) + ActionMailer::Base.deliveries.clear + + Mailer.reminders(:days => 7) + assert_equal 2, ActionMailer::Base.deliveries.size + assert_equal %w(dlopper@somenet.foo jsmith@somenet.foo), ActionMailer::Base.deliveries.map(&:bcc).flatten.sort + ActionMailer::Base.deliveries.each do |mail| + assert_mail_body_match 'Assigned to group', mail + end + end + end + def test_mailer_should_not_change_locale Setting.default_language = 'en' # Set current language to italian |