aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-30 18:58:11 +0300
committerGravatar Vitaly Takmazov2018-04-30 18:58:11 +0300
commiteeb59ea1f2e2bd4307573d01238c8c4ce35d4179 (patch)
treea2c10298c4ac25c075fcb2ec5450d41dcbfa37e5 /juick-server/src/test/java
parentcf61b2fc3c3ae6201e7a007ac11690700a6d619a (diff)
server: fix classic likes counter
Diffstat (limited to 'juick-server/src/test/java')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java5
1 files changed, 5 insertions, 0 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 d719c183..692cc182 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
@@ -858,6 +858,11 @@ public class ServerTests {
assertThat(messagesService.getMessages(Collections.singletonList(mid1)).get(0).getLikes(), is(0));
Assert.assertEquals(1, msg4.getReactions().stream().filter(r -> r.getId() == 2)
.findFirst().orElseThrow(IllegalStateException::new).getCount());
+ mockMvc.perform(post("/react?mid=" + mid1 + "&hash=" + freefdHash+ "&reactionId=1"))
+ .andExpect(status().isOk());
+ mockMvc.perform(post("/react?mid=" + mid1 + "&hash=" + freefdHash+ "&reactionId=1"))
+ .andExpect(status().isOk());
+ assertThat(messagesService.getMessage(mid1).getLikes(), is(1));
}
@Test