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