From afb897034311fe7e0e981ec44100d3b3fd3ef39d Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 7 Mar 2020 16:01:52 +0300 Subject: Load EmailManager conditionally --- src/test/java/com/juick/server/tests/ServerTests.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/test') 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") -- cgit v1.2.3