From be91c5f5771282f2798cb687f915b0df44eaa59e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Mar 2018 11:36:13 +0300 Subject: jdbc: no more notifications from banned users --- .../src/test/java/com/juick/service/MessageServiceTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'juick-server-jdbc/src/test/java/com/juick/service') diff --git a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java index 4ef06789..57e0970a 100644 --- a/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java +++ b/juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java @@ -179,8 +179,11 @@ public class MessageServiceTest extends AbstractJUnit4SpringContextTests { assertEquals("weather", msg3.getTags().get(0).getName()); assertEquals(ugnich.getUid(), userService.checkPassword(ugnich.getName(), "x")); assertEquals(-1, userService.checkPassword(ugnich.getName(), "xy")); + subscriptionService.subscribeMessage(msg.getMid(), user.getUid()); subscriptionService.subscribeMessage(msg.getMid(), ugnich.getUid()); - assertEquals(1, subscriptionService.getUsersSubscribedToComments(msg.getMid(), user.getUid()).size()); + int reply_id = messagesService.createReply(msg.getMid(), 0, ugnich_id, "comment", null); + assertEquals(1, subscriptionService.getUsersSubscribedToComments(msg, + messagesService.getReply(msg.getMid(), reply_id)).size()); assertThat(messagesService.getDiscussions(ugnich.getUid(), Instant.now().toEpochMilli()).get(0), equalTo(msg.getMid())); messagesService.deleteMessage(user_id, mid); -- cgit v1.2.3