aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc/src/test/java/com/juick/service
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-jdbc/src/test/java/com/juick/service')
-rw-r--r--juick-server-jdbc/src/test/java/com/juick/service/MessageServiceTest.java5
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);