Skip to content

Commit

Permalink
fix(FSADT1-1101|FSADT1-1103|FSADT1-1106): fixing review email
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj committed Jan 6, 2024
1 parent 42c954f commit 589765d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@ public class ClientSubmissionMailService {
@ServiceActivator(inputChannel = ApplicationConstant.SUBMISSION_MAIL_CHANNEL)
public void sendMail(Message<EmailRequestDto> mailMessage) {

if (
Objects.equals(mailMessage.getHeaders().get(
ApplicationConstant.SUBMISSION_TYPE, SubmissionTypeCodeEnum.class
), SubmissionTypeCodeEnum.RNC)
) {
log.info("Receiving a review notification, mail not sent {} {} -> {}",
mailMessage.getPayload().email(),
mailMessage.getPayload().subject(),
mailMessage.getPayload().variables()
);
return;
}
log.info("Sending email to {} {} -> {}",
mailMessage.getPayload().email(),
mailMessage.getPayload().subject(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void shouldPreventReviewMails() {
.untilAsserted(() -> {
wireMockExtension
.verify(
0,
1,
postRequestedFor(urlEqualTo("/ches/email"))
.withHeader("Content-Type", containing(MediaType.APPLICATION_JSON_VALUE))
.withRequestBody(equalToJson(TestConstants.EMAIL_REQUEST_JSON)
Expand Down

0 comments on commit 589765d

Please sign in to comment.