From c5649915e6259e921cfd087042525b69533d53b0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 12 Apr 2018 14:32:44 +0300 Subject: notifications: pushserver is the only websocket component for now --- .../test/java/com/juick/components/test/NotificationTests.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'juick-notifications/src/test/java/com/juick') diff --git a/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java b/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java index f1a4787d..573771fc 100644 --- a/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java +++ b/juick-notifications/src/test/java/com/juick/components/test/NotificationTests.java @@ -21,12 +21,9 @@ import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.spi.LoggingEvent; import ch.qos.logback.core.Appender; -import com.juick.components.CleanUp; import com.juick.components.Notifications; -import com.juick.components.service.TokenService; import org.junit.Before; import org.junit.Test; -import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.slf4j.LoggerFactory; @@ -41,14 +38,10 @@ import static org.mockito.Mockito.*; * Created by vitalyster on 22.11.2016. */ public class NotificationTests { - @InjectMocks - CleanUp cleanUp; @Mock RestTemplate rest; @Mock - TokenService tokenService; - @Mock Notifications push; @@ -66,7 +59,7 @@ public class NotificationTests { when(mockAppender.getName()).thenReturn("MOCK"); root.setLevel(Level.DEBUG); root.addAppender(mockAppender); - cleanUp.cleanupTokens(); + push.cleanupTokens(); verify(mockAppender).doAppend(argThat(argument -> ((LoggingEvent)argument).getFormattedMessage().contains("1 tokens"))); } -- cgit v1.2.3