diff options
Diffstat (limited to 'src/test/java/com/juick/server/tests')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index cc42383b..1aaa578d 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1842,4 +1842,14 @@ public class ServerTests { .andExpect(status().isOk()) .andExpect(content().string(containsString("XMPP support is disabled"))); } + @Test + public void ActivityPubLikesShouldNotMirrorMessage() throws Exception { + jdbcTemplate.execute("DELETE FROM messages"); + Message msg = commandsManager.processCommand(ugnich, "YO", emptyUri).getNewMessage().get(); + messagesService.likeMessage(msg.getMid(), freefd.getUid(), Reaction.LIKE); + messagesService.likeMessage(msg.getMid(), 0, Reaction.LIKE, "http://localhost:8080/u/test"); + jdbcTemplate.update("UPDATE messages SET popular=1 where message_id=?", msg.getMid()); + List<Message> top = messagesService.getMessages(ugnich, messagesService.getPopular(ugnich.getUid(), 0)); + assertThat(top.size(), is(1)); + } } |