diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-10-06 13:08:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-10-06 13:08:52 +0000 |
commit | 015ca366341ba2fa9f1d7903907ddab19a87865f (patch) | |
tree | fce88f7a0fb880d3584352e255dfd420c3e798d6 /test/unit/journal_observer_test.rb | |
parent | b41096d9d00b0eb4c9004936b4ed5f127ec3f2c4 (diff) | |
download | redmine-015ca366341ba2fa9f1d7903907ddab19a87865f.tar.gz redmine-015ca366341ba2fa9f1d7903907ddab19a87865f.zip |
Send individual emails for each mail recipient (#26791).
We are creating multipe mails per class notification event, one per
recipient, wrapped in a Mailer::MultiMessage object to send them all at
once.
We keep the existing interface of all class methods intended to be used
by external code the same as they were before, with one exception:
We provide additional recipient addresses in options[:recipients] for
Mailer.security_notification. Since the first-class recipients have to
be users to render individual mails for them, additional recipient
addresses have to be provided with some other channel.
By providing additional recipients in options[:recipients], we can solve
the use-case for address change notifications for users, which probably
is the only real use-case for having to use a plain email address
instead of a User as a notification recipient.
Patch by Holger Just and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17583 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/journal_observer_test.rb')
-rw-r--r-- | test/unit/journal_observer_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/journal_observer_test.rb b/test/unit/journal_observer_test.rb index e9eac32e5..17695538a 100644 --- a/test/unit/journal_observer_test.rb +++ b/test/unit/journal_observer_test.rb @@ -36,7 +36,7 @@ class JournalObserverTest < ActiveSupport::TestCase with_settings :notified_events => %w(issue_updated) do assert journal.save end - assert_equal 1, ActionMailer::Base.deliveries.size + assert_equal 2, ActionMailer::Base.deliveries.size end def test_create_should_not_send_email_notification_with_notify_set_to_false @@ -71,7 +71,7 @@ class JournalObserverTest < ActiveSupport::TestCase with_settings :notified_events => %w(issue_note_added) do assert journal.save end - assert_equal 1, ActionMailer::Base.deliveries.size + assert_equal 2, ActionMailer::Base.deliveries.size end def test_create_should_not_send_email_notification_without_issue_note_added @@ -95,7 +95,7 @@ class JournalObserverTest < ActiveSupport::TestCase with_settings :notified_events => %w(issue_status_updated) do assert issue.save end - assert_equal 1, ActionMailer::Base.deliveries.size + assert_equal 2, ActionMailer::Base.deliveries.size end def test_create_should_not_send_email_notification_without_issue_status_updated @@ -132,7 +132,7 @@ class JournalObserverTest < ActiveSupport::TestCase with_settings :notified_events => %w(issue_assigned_to_updated) do assert issue.save end - assert_equal 1, ActionMailer::Base.deliveries.size + assert_equal 2, ActionMailer::Base.deliveries.size end def test_create_should_not_send_email_notification_without_issue_assignee_updated @@ -157,7 +157,7 @@ class JournalObserverTest < ActiveSupport::TestCase with_settings :notified_events => %w(issue_priority_updated) do assert issue.save end - assert_equal 1, ActionMailer::Base.deliveries.size + assert_equal 2, ActionMailer::Base.deliveries.size end def test_create_should_not_send_email_notification_without_issue_priority_updated |