@@ -517,6 +517,21 @@ def test_issue_add_should_include_issue_status_type_badge
517
517
end
518
518
end
519
519
520
+ def test_issue_add_should_include_recipients_on_mail_footer
521
+ with_settings :show_recipients_in_mail_footer => '1' do
522
+ issue = Issue . find ( 1 )
523
+ Mailer . deliver_issue_add ( issue )
524
+ mail = last_email
525
+ assert_select_email do
526
+ assert_select 'span.recipients' do |span |
527
+ assert_include 'The following recipients have also received this email.' , span . text
528
+ assert_include 'John Smith' , span . text
529
+ assert_include 'Dave Lopper' , span . text
530
+ end
531
+ end
532
+ end
533
+ end
534
+
520
535
def test_issue_edit_subject_should_include_status_changes_if_setting_is_enabled
521
536
with_settings :show_status_changes_in_mail_subject => 1 do
522
537
issue = Issue . find ( 2 )
@@ -608,6 +623,40 @@ def test_issue_edit_with_relation_should_notify_users_who_can_see_the_related_is
608
623
end
609
624
end
610
625
626
+ def test_issue_edit_should_include_recipients_on_mail_footer
627
+ with_settings :show_recipients_in_mail_footer => '1' do
628
+ issue = Issue . find ( 1 )
629
+ issue . init_journal ( User . current )
630
+ issue . update ( :status_id => 4 )
631
+ journal = issue . journals . last
632
+ Mailer . deliver_issue_edit ( journal )
633
+ mail = last_email
634
+ assert_select_email do
635
+ assert_select 'span.recipients' do |span |
636
+ assert_include 'The following recipients have also received this email.' , span . text
637
+ assert_include 'John Smith' , span . text
638
+ assert_include 'Dave Lopper' , span . text
639
+ end
640
+ end
641
+ end
642
+ end
643
+
644
+ def test_document_added_should_include_recipients_on_mail_footer
645
+ with_settings :show_recipients_in_mail_footer => '1' do
646
+ document = Document . find ( 1 )
647
+ author = User . find ( 2 )
648
+ Mailer . deliver_document_added ( document , author )
649
+ mail = last_email
650
+ assert_select_email do
651
+ assert_select 'span.recipients' do |span |
652
+ assert_include 'The following recipients have also received this email.' , span . text
653
+ assert_include 'John Smith' , span . text
654
+ assert_include 'Dave Lopper' , span . text
655
+ end
656
+ end
657
+ end
658
+ end
659
+
611
660
def test_issue_should_send_email_notification_with_suppress_empty_fields
612
661
ActionMailer ::Base . deliveries . clear
613
662
with_settings :notified_events => %w( issue_added ) do
0 commit comments