From cf61b2fc3c3ae6201e7a007ac11690700a6d619a Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 26 Apr 2018 10:21:30 +0300 Subject: api: empty post should return 400 --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-server') 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()); + } } -- cgit v1.2.3