Skip to content

Commit

Permalink
Fix build after html formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 27, 2024
1 parent 9278eb6 commit 97fa6cc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.List;
import java.util.stream.Stream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand All @@ -31,7 +32,9 @@ void sweep() {

MimeMessageParser messageParser = super.mailMessage();
String htmlContent = messageParser.getHtmlContent();
assertTrue(htmlContent.contains("Your Inviter role Mail at the application Calendar EN will expire"));
//Due to html formatting we can't be sure of the line breaks
Stream.of("Your Inviter role Mail at the application Calendar EN will expire in 5 days".split(" "))
.forEach(s -> assertTrue(htmlContent.contains(s)));

userRole = userRoleRepository.findByRoleName("Mail").get(0);
assertEquals(1, userRole.getExpiryNotifications());
Expand Down

0 comments on commit 97fa6cc

Please sign in to comment.