diff options
author | Vitaly Takmazov | 2020-03-07 16:01:52 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2020-03-07 16:01:52 +0300 |
commit | afb897034311fe7e0e981ec44100d3b3fd3ef39d (patch) | |
tree | 6104cab72b5eaae4b499e35b7bbc93be875e4336 /src/test/java | |
parent | c9d67837cbcaae84a03b7bd14e508ca62880f87f (diff) |
Load EmailManager conditionally
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 6b5a60a4..0b915431 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -254,8 +254,6 @@ public class ServerTests { @Inject private KeystoreManager testKeystoreManager; - @Inject - private EmailManager emailManager; @Inject private ApplicationEventPublisher applicationEventPublisher; @@ -2319,18 +2317,18 @@ public class ServerTests { @Test public void emailTemplatesTest() throws IOException { - String plainText = emailManager.renderPlaintext("yo", "https://localhost/m/1").orElseThrow(); + String plainText = webApp.renderPlaintext("yo", "https://localhost/m/1").orElseThrow(); assertThat(plainText, is(getSnapshot(testSubscriptionTextEmail))); User demo = MockUtils.mockUser(45, ugnichName, ugnichPassword); Message html = MockUtils.mockMessage(56, demo, "yo"); - String htmlText = emailManager.renderHtml( + String htmlText = webApp.renderHtml( MessageUtils.formatHtml(html), PlainTextFormatter.formatUrl(html), html, "12345") .orElseThrow(); assertThat(htmlText, is(getSnapshot(testSubscriptionHtmlEmail))); html.setMid(0); - String htmlPM = emailManager.renderHtml( + String htmlPM = webApp.renderHtml( MessageUtils.formatHtml(html), PlainTextFormatter.formatUrl(html), html, "12345") |