aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-20 11:22:21 +0300
committerGravatar Vitaly Takmazov2018-04-20 11:22:21 +0300
commitdb14962b7171eb0e713da54eecb032331d551d66 (patch)
tree85d24b6a9d6d57759a2bc944bdf439614c2b1662 /juick-server/src/test/java/com/juick
parent842e903d5b987dd23e82a423bddae75acdea0c9c (diff)
server: /reactions list
Diffstat (limited to 'juick-server/src/test/java/com/juick')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java9
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