@@ -530,6 +530,21 @@ def test_issue_add_should_include_issue_status_type_badge
530
530
end
531
531
end
532
532
533
+ def test_issue_add_should_include_recipients_on_mail_footer
534
+ with_settings :show_recipients_in_mail_footer => '1' do
535
+ issue = Issue . find ( 1 )
536
+ Mailer . deliver_issue_add ( issue )
537
+ mail = last_email
538
+ assert_select_email do
539
+ assert_select 'span.recipients' do |span |
540
+ assert_include 'The following recipients have also received this email.' , span . text
541
+ assert_include 'John Smith' , span . text
542
+ assert_include 'Dave Lopper' , span . text
543
+ end
544
+ end
545
+ end
546
+ end
547
+
533
548
def test_issue_edit_subject_should_include_status_changes_if_setting_is_enabled
534
549
with_settings :show_status_changes_in_mail_subject => 1 do
535
550
issue = Issue . find ( 2 )
@@ -654,6 +669,40 @@ def test_issue_edit_should_notify_mentioned_users_in_notes
654
669
assert_include User . find ( 1 ) . mail , recipients
655
670
end
656
671
672
+ def test_issue_edit_should_include_recipients_on_mail_footer
673
+ with_settings :show_recipients_in_mail_footer => '1' do
674
+ issue = Issue . find ( 1 )
675
+ issue . init_journal ( User . current )
676
+ issue . update ( :status_id => 4 )
677
+ journal = issue . journals . last
678
+ Mailer . deliver_issue_edit ( journal )
679
+ mail = last_email
680
+ assert_select_email do
681
+ assert_select 'span.recipients' do |span |
682
+ assert_include 'The following recipients have also received this email.' , span . text
683
+ assert_include 'John Smith' , span . text
684
+ assert_include 'Dave Lopper' , span . text
685
+ end
686
+ end
687
+ end
688
+ end
689
+
690
+ def test_document_added_should_include_recipients_on_mail_footer
691
+ with_settings :show_recipients_in_mail_footer => '1' do
692
+ document = Document . find ( 1 )
693
+ author = User . find ( 2 )
694
+ Mailer . deliver_document_added ( document , author )
695
+ mail = last_email
696
+ assert_select_email do
697
+ assert_select 'span.recipients' do |span |
698
+ assert_include 'The following recipients have also received this email.' , span . text
699
+ assert_include 'John Smith' , span . text
700
+ assert_include 'Dave Lopper' , span . text
701
+ end
702
+ end
703
+ end
704
+ end
705
+
657
706
def test_issue_should_send_email_notification_with_suppress_empty_fields
658
707
ActionMailer ::Base . deliveries . clear
659
708
with_settings :notified_events => %w( issue_added ) do
0 commit comments