aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-30 17:55:00 +0300
committerGravatar Vitaly Takmazov2018-11-30 17:55:00 +0300
commitf470a96b9cd20bc42651d99178df1e0ca031ca3e (patch)
tree6dc1dc91c1127fdbf552f3856717226a18cc415f /src/test/java/com
parent4af8dfbaf86cdfd31b466dec3c10060090bf46b7 (diff)
add incomplete test case for mirroring messages
Diffstat (limited to 'src/test/java/com')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java10
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));
+ }
}