From 2f4701110c5deff4d0f83d728ac15c98b965f3a8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 1 Sep 2018 01:59:13 +0300 Subject: fix message replies counters with banned users --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-server/src/test/java/com/juick/server/tests') 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 c6d1bc1a..b5f5143b 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 @@ -1317,6 +1317,9 @@ public class ServerTests { int bannedRid = messagesService.createReply(mid, 0, banned, "KURWA", null); int casualRid = messagesService.createReply(mid, 0, userService.getUserByName("user"), "DOOR", null); assertThat(messagesService.getReplies(AnonymousUser.INSTANCE, mid).size(), is(1)); + assertThat(messagesService.getMessages(AnonymousUser.INSTANCE, Collections.singletonList(mid)).get(0).getReplies(), is(1)); assertThat(messagesService.getReplies(banned, mid).size(), is(2)); + assertThat(messagesService.getMessages(banned, Collections.singletonList(mid)).get(0).getReplies(), is(2)); + } } -- cgit v1.2.3