diff options
author | Vitaly Takmazov | 2018-04-20 11:22:21 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-20 11:22:21 +0300 |
commit | db14962b7171eb0e713da54eecb032331d551d66 (patch) | |
tree | 85d24b6a9d6d57759a2bc944bdf439614c2b1662 /juick-server/src/test/java/com/juick/server/tests | |
parent | 842e903d5b987dd23e82a423bddae75acdea0c9c (diff) |
server: /reactions list
Diffstat (limited to 'juick-server/src/test/java/com/juick/server/tests')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 9 |
1 files changed, 7 insertions, 2 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 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 |