diff options
author | Vitaly Takmazov | 2018-03-20 11:36:13 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-20 11:36:13 +0300 |
commit | be91c5f5771282f2798cb687f915b0df44eaa59e (patch) | |
tree | 1d216e62851bf7cdc065a73d3a6d3d55e3137775 /juick-server/src/test | |
parent | 4a1e9c4d8868ad1f14cd1c8df57db80bfbd897ce (diff) |
jdbc: no more notifications from banned users
Diffstat (limited to 'juick-server/src/test')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 12 |
1 files changed, 11 insertions, 1 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 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()); |