diff options
author | Vitaly Takmazov | 2018-03-20 11:36:13 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-20 11:36:13 +0300 |
commit | be91c5f5771282f2798cb687f915b0df44eaa59e (patch) | |
tree | 1d216e62851bf7cdc065a73d3a6d3d55e3137775 /juick-server-jdbc/src/test/java/com/juick | |
parent | 4a1e9c4d8868ad1f14cd1c8df57db80bfbd897ce (diff) |
jdbc: no more notifications from banned users
Diffstat (limited to 'juick-server-jdbc/src/test/java/com/juick')
-rw-r--r-- | juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
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); |