From 37f643b3466307e0b29b105df23b585108c7c564 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Oct 2021 23:41:15 +0300 Subject: Top feed should not contain banned users --- src/test/java/com/juick/server/tests/ServerTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/test/java/com/juick') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index ff86f4b4..aceed0b9 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1178,9 +1178,11 @@ public class ServerTests { assertThat(nonblmsgs.get(0).getReplies(), is(5)); commandsManager.processCommand(ugnich, "BL @freefd", emptyUri); Tag tag = tagService.getTag("linux", true); - messagesService.createMessage(freefd.getUid(), "sux", null, Collections.singletonList(tag)); + int freefdMsg = messagesService.createMessage(freefd.getUid(), "sux", null, Collections.singletonList(tag)); assertThat(messagesService.getTag(tag.TID, freefd.getUid(), 0, 10).size(), is(1)); assertThat(messagesService.getTag(tag.TID, ugnich.getUid(), 0, 10).size(), is(0)); + messagesService.recommendMessage(freefdMsg, serviceUser.getUid()); + assertThat(messagesService.getUserBlogWithRecommendations(serviceUser, ugnich, 0, 0).contains(freefdMsg), is(false)); commandsManager.processCommand(ugnich, "BL @freefd", emptyUri); } -- cgit v1.2.3