diff options
author | Anita Stanisz <106669481+anita-stanisz-sonarsource@users.noreply.github.com> | 2024-11-29 15:43:07 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-11-29 20:03:08 +0000 |
commit | 170f39121421b369abf7fda95fb1b47f57e1362a (patch) | |
tree | 7d67d30f9b920cd498048137799877db61ebf120 /server/sonar-server-common/src/test | |
parent | 4661c2a6d14d3b473ba4441b05f46b76e9cf18eb (diff) | |
download | sonarqube-170f39121421b369abf7fda95fb1b47f57e1362a.tar.gz sonarqube-170f39121421b369abf7fda95fb1b47f57e1362a.zip |
SQRP-119 (#12446)
Diffstat (limited to 'server/sonar-server-common/src/test')
3 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java index b2c18994f20..009ed3c2d2d 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/ChangesOnMyIssuesEmailTemplateTest.java @@ -329,7 +329,7 @@ public class ChangesOnMyIssuesEmailTemplateTest { // skip content HtmlListAssert htmlListAssert = skipContent.apply(htmlAssert); - String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube Server." + String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube." + " Click here to edit your email preferences."; htmlListAssert.hasEmptyParagraph() .hasParagraph(footerText) diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java index df3912a4e56..967e5955cd8 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/FpPrAcceptedEmailTemplateTest.java @@ -148,7 +148,7 @@ public class FpPrAcceptedEmailTemplateTest { EmailMessage emailMessage = underTest.format(new FPOrAcceptedNotification(change, Collections.emptySet(), fpPrAccepted)); - String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube Server." + String footerText = "You received this email because you are subscribed to \"" + wordingNotification + "\" notifications from SonarQube." + " Click here to edit your email preferences."; HtmlFragmentAssert.assertThat(emailMessage.getMessage()) .hasParagraph("Hi,") diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java index 26b7ad0f615..750fdff9f10 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/notification/email/EmailNotificationChannelTest.java @@ -64,7 +64,7 @@ import static org.mockito.Mockito.when; @RunWith(DataProviderRunner.class) public class EmailNotificationChannelTest { - private static final String SUBJECT_PREFIX = "[SONARQUBE SERVER]"; + private static final String SUBJECT_PREFIX = "[SONARQUBE]"; @Rule public LogTester logTester = new LogTester(); @@ -122,9 +122,9 @@ public class EmailNotificationChannelTest { MimeMessage email = messages.get(0).getMimeMessage(); assertThat(email.getHeader("Content-Type", null)).isEqualTo("text/plain; charset=UTF-8"); - assertThat(email.getHeader("From", ",")).isEqualTo("SonarQube Server from NoWhere <server@nowhere>"); + assertThat(email.getHeader("From", ",")).isEqualTo("SonarQube from NoWhere <server@nowhere>"); assertThat(email.getHeader("To", null)).isEqualTo("<user@nowhere>"); - assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE SERVER] Test Message from SonarQube"); + assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE] Test Message from SonarQube"); assertThat((String) email.getContent()).startsWith("This is a test message from SonarQube.\r\n\r\nMail sent from: http://nemo.sonarsource.org"); } @@ -184,12 +184,12 @@ public class EmailNotificationChannelTest { assertThat(email.getHeader("In-Reply-To", null)).isEqualTo("<reviews/view/1@nemo.sonarsource.org>"); assertThat(email.getHeader("References", null)).isEqualTo("<reviews/view/1@nemo.sonarsource.org>"); - assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube Server <sonar.nemo.sonarsource.org>"); + assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube <sonar.nemo.sonarsource.org>"); assertThat(email.getHeader("List-Archive", null)).isEqualTo("http://nemo.sonarsource.org"); - assertThat(email.getHeader("From", ",")).isEqualTo("\"Full Username (SonarQube Server from NoWhere)\" <server@nowhere>"); + assertThat(email.getHeader("From", ",")).isEqualTo("\"Full Username (SonarQube from NoWhere)\" <server@nowhere>"); assertThat(email.getHeader("To", null)).isEqualTo("<user@nowhere>"); - assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE SERVER] Review #3"); + assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE] Review #3"); assertThat((String) email.getContent()).startsWith("I'll take care of this violation."); assertThat(delivered).isTrue(); } @@ -213,12 +213,12 @@ public class EmailNotificationChannelTest { assertThat(email.getHeader("In-Reply-To", null)).isNull(); assertThat(email.getHeader("References", null)).isNull(); - assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube Server <sonar.nemo.sonarsource.org>"); + assertThat(email.getHeader("List-ID", null)).isEqualTo("SonarQube <sonar.nemo.sonarsource.org>"); assertThat(email.getHeader("List-Archive", null)).isEqualTo("http://nemo.sonarsource.org"); - assertThat(email.getHeader("From", null)).isEqualTo("SonarQube Server from NoWhere <server@nowhere>"); + assertThat(email.getHeader("From", null)).isEqualTo("SonarQube from NoWhere <server@nowhere>"); assertThat(email.getHeader("To", null)).isEqualTo("<user@nowhere>"); - assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE SERVER] Foo"); + assertThat(email.getHeader("Subject", null)).isEqualTo("[SONARQUBE] Foo"); assertThat((String) email.getContent()).startsWith("Bar"); assertThat(delivered).isTrue(); } @@ -380,7 +380,7 @@ public class EmailNotificationChannelTest { when(configuration.getSmtpPort()).thenReturn(smtpServer.getServer().getPort()); when(configuration.getSecureConnection()).thenReturn("NONE"); when(configuration.getFrom()).thenReturn("server@nowhere"); - when(configuration.getFromName()).thenReturn("SonarQube Server from NoWhere"); + when(configuration.getFromName()).thenReturn("SonarQube from NoWhere"); when(configuration.getPrefix()).thenReturn(SUBJECT_PREFIX); when(server.getPublicRootUrl()).thenReturn("http://nemo.sonarsource.org"); } |