aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/test/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-26 10:21:30 +0300
committerGravatar Vitaly Takmazov2018-04-26 10:21:30 +0300
commitcf61b2fc3c3ae6201e7a007ac11690700a6d619a (patch)
tree1b3dbb59d76f28d045104007a2b2a26f81d0b196 /juick-server/src/test/java
parenta7825dede977692c0418119159090290e4f6ac34 (diff)
api: empty post should return 400
Diffstat (limited to 'juick-server/src/test/java')
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java6
1 files changed, 6 insertions, 0 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 64f92863..d719c183 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
@@ -996,4 +996,10 @@ public class ServerTests {
request, CommandResult.class);
assertThat(result.getStatusCode(), is(HttpStatus.OK));
}
+ @Test
+ public void emptyAuthenticatedPostShouldThrowBadRequest() throws Exception {
+ mockMvc.perform(post("/post")
+ .with(httpBasic(juickName, juickPassword)))
+ .andExpect(status().isBadRequest());
+ }
}