@@ -62,12 +62,14 @@ export const postEmailTest = async (
6262 programItemId : programId ,
6363 programItemStartTime : new Date ( ) . toISOString ( ) ,
6464 } ;
65+ const body = getEmailBodyAccepted ( "Test Program Item" , mockNotification ) ;
66+ const htmlBody = body . replaceAll ( "\n" , "<br />" ) ;
6567 message = {
6668 from : config . server ( ) . emailSendFromAddress ,
6769 to : email ,
6870 subject : getEmailSubjectAccepted ( ) ,
69- text : getEmailBodyAccepted ( "Test Program Item" , mockNotification ) ,
70- html : getEmailBodyAccepted ( "Test Program Item" , mockNotification ) ,
71+ text : body ,
72+ html : htmlBody ,
7173 } ;
7274 } else if ( notificationType === EmailNotificationTrigger . REJECTED ) {
7375 const mockNotification : NotificationTask = {
@@ -76,12 +78,14 @@ export const postEmailTest = async (
7678 programItemId : programId ,
7779 programItemStartTime : new Date ( ) . toISOString ( ) ,
7880 } ;
81+ const body = getEmailBodyRejected ( mockNotification ) ;
82+ const htmlBody = body . replaceAll ( "\n" , "<br />" ) ;
7983 message = {
8084 from : config . server ( ) . emailSendFromAddress ,
8185 to : email ,
8286 subject : getEmailSubjectRejected ( ) ,
83- text : getEmailBodyRejected ( mockNotification ) ,
84- html : getEmailBodyRejected ( mockNotification ) ,
87+ text : body ,
88+ html : htmlBody ,
8589 } ;
8690 } else {
8791 return res . status ( 400 ) . json ( { message : "Invalid notification type" } ) ;
0 commit comments