@@ -517,6 +517,21 @@ def test_issue_add_should_include_issue_status_type_badge
517517    end 
518518  end 
519519
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+ 
520535  def  test_issue_edit_subject_should_include_status_changes_if_setting_is_enabled 
521536    with_settings  :show_status_changes_in_mail_subject  =>  1  do 
522537      issue  =  Issue . find ( 2 ) 
@@ -608,6 +623,40 @@ def test_issue_edit_with_relation_should_notify_users_who_can_see_the_related_is
608623    end 
609624  end 
610625
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+ 
611660  def  test_issue_should_send_email_notification_with_suppress_empty_fields 
612661    ActionMailer ::Base . deliveries . clear 
613662    with_settings  :notified_events  =>  %w( issue_added )  do 
0 commit comments