From be91c5f5771282f2798cb687f915b0df44eaa59e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Mar 2018 11:36:13 +0300 Subject: jdbc: no more notifications from banned users --- .../src/test/java/com/juick/server/tests/ServerTests.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'juick-server/src/test/java/com/juick') 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 99453f32..f831141b 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 @@ -96,6 +96,8 @@ public class ServerTests extends AbstractJUnit4SpringContextTests { @Inject private SubscriptionService subscriptionService; @Inject + private PrivacyQueriesService privacyQueriesService; + @Inject private JdbcTemplate jdbcTemplate; @Value("${hostname:localhost}") private Jid jid; @@ -389,8 +391,16 @@ public class ServerTests extends AbstractJUnit4SpringContextTests { assertEquals("should be favorited", "Message added to your recommendations", juickProtocol.getReply(readerUser, "! #" + mid)); */ + int rid = messagesService.createReply(mid, 0, uid, "comment", null); assertEquals("number of subscribed users should match", 1, - subscriptionService.getUsersSubscribedToComments(mid, uid).size()); + subscriptionService.getUsersSubscribedToComments( + messagesService.getMessage(mid), + messagesService.getReply(mid, rid)).size()); + privacyQueriesService.blacklistUser(user, readerUser); + assertEquals("number of subscribed users should match", 0, + subscriptionService.getUsersSubscribedToComments( + messagesService.getMessage(mid), + messagesService.getReply(mid, rid)).size()); /* assertEquals("should be subscribed", "Subscribed", bot.processCommand(readerUser, Jid.of("dummy@localhost"), "S @" + user.getName()).get()); -- cgit v1.2.3