diff options
author | 2018-04-12 00:41:57 +0300 | |
---|---|---|
committer | 2018-04-12 00:41:57 +0300 | |
commit | 97ffb90f765078aca3e4d6d173a6c93182d9165c (patch) | |
tree | 7e9c985d6b682522905c1ef63ec5cea63cbaf72a /juick-server/src/test | |
parent | e319dda17260334262603df9cdc18fe52d6c164b (diff) |
subscription mark all comments read
Diffstat (limited to 'juick-server/src/test')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 6 |
1 files changed, 3 insertions, 3 deletions
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<User, Integer, Integer> lastRead = (user, m) -> jdbcTemplate.queryForObject( "SELECT last_read_rid FROM subscr_messages WHERE suser_id=? AND message_id=?", |