From 97ffb90f765078aca3e4d6d173a6c93182d9165c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 12 Apr 2018 00:41:57 +0300 Subject: subscription mark all comments read --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-server') diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java index a7701511..cdf10326 100644 --- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java @@ -262,8 +262,8 @@ public class ServerTests { 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()); + subscriptionService.subscribeMessage(msg, user); + subscriptionService.subscribeMessage(msg, ugnich); int reply_id = messagesService.createReply(msg.getMid(), 0, ugnich, "comment", null); assertEquals(1, subscriptionService.getUsersSubscribedToComments(msg, messagesService.getReply(msg.getMid(), reply_id)).size()); @@ -751,7 +751,7 @@ public class ServerTests { @Test public void lastReadTests() { int mid = messagesService.createMessage(ugnich.getUid(), "to be watched", null, null); - subscriptionService.subscribeMessage(mid, ugnich.getUid()); + subscriptionService.subscribeMessage(messagesService.getMessage(mid), ugnich); messagesService.createReply(mid, 0, freefd, "new reply", null); BiFunction lastRead = (user, m) -> jdbcTemplate.queryForObject( "SELECT last_read_rid FROM subscr_messages WHERE suser_id=? AND message_id=?", -- cgit v1.2.3