From 05987c6aae8970b3ee30409ba9ee71cd4606d78c Mon Sep 17 00:00:00 2001 From: erickmob Date: Mon, 13 Jul 2020 10:41:42 -0300 Subject: [PATCH] one more test on controller --- .../schedulingjob/controller/JobControllerTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/com/erickmob/schedulingjob/controller/JobControllerTest.java b/src/test/java/com/erickmob/schedulingjob/controller/JobControllerTest.java index 90744dc..2035a22 100644 --- a/src/test/java/com/erickmob/schedulingjob/controller/JobControllerTest.java +++ b/src/test/java/com/erickmob/schedulingjob/controller/JobControllerTest.java @@ -57,4 +57,17 @@ void sendDataWhenSameDateAndExpectErrorStatus() throws Exception { .andExpect(status().isBadRequest()); } + + @Test + void sendEmptyDataExpectErrorStatus() throws Exception { + + JobsDTO jobsDTO = new JobsDTO(); + ResultActions resultActions = mockMvc + .perform( + post("/sequenceJobs") + .contentType(TestUtil.APPLICATION_JSON_UTF8) + .content(TestUtil.convertObjectToJsonBytes(jobsDTO))) + .andExpect(status().isNotAcceptable()); + + } }