From db14962b7171eb0e713da54eecb032331d551d66 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 20 Apr 2018 11:22:21 +0300 Subject: server: /reactions list --- .../src/test/java/com/juick/server/tests/ServerTests.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (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 6b31906d..575bc7d1 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 @@ -444,9 +444,14 @@ public class ServerTests { .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) .andExpect((jsonPath("$[0].reactions[?(@.id == 3)].count", - Matchers.is(Collections.singletonList(1))))) + is(Collections.singletonList(1))))) .andExpect((jsonPath("$[0].reactions[?(@.id == 2)].count", - Matchers.is(Collections.singletonList(2))))); + is(Collections.singletonList(2))))); + + mockMvc.perform(get("/reactions?hash=" + userIdHash)) + .andExpect(status().isOk()) + .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8)) + .andExpect(jsonPath("$.length()", is(7))); } @Test -- cgit v1.2.3