From eeb59ea1f2e2bd4307573d01238c8c4ce35d4179 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 30 Apr 2018 18:58:11 +0300 Subject: server: fix classic likes counter --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'juick-server/src/test/java/com') 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 -- cgit v1.2.3