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