aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-03-23 00:32:57 +0300
committerGravatar Vitaly Takmazov2022-03-23 00:32:57 +0300
commit2788060f586efb13cce6fa2b11dbfee630546ece (patch)
tree144e4926bf9eab1edbd14c0a349f5db44a73fc4d /src/test/java/com/juick
parent42769a27edc7718231ebfa6ca723a8b0d80f4e30 (diff)
Return correct replies counter on /thread API endpoint
* replies counter will not include replies from banned users now
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 8cff4826..18aa41f7 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1274,6 +1274,9 @@ public class ServerTests {
assertThat(messagesService.getMessage(mid).get().getReplies(), is(4));
replies = messagesService.getReplies(ugnich, mid);
assertThat(replies.size(), is(1));
+ mockMvc.perform(get("/api/thread").with(httpBasic(ugnichName, ugnichPassword)).param("mid",
+ String.valueOf(mid)))
+ .andExpect(jsonPath("$[0].replies", is(1)));
commandsManager.processCommand(serviceUser, String.format("#%d/4 mmm?!", mid), emptyUri);
assertThat(messagesService.getMessage(mid).get().getReplies(), is(5));
replies = messagesService.getReplies(ugnich, mid);