File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/test/java/com/answerdigital/answerking/controller Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ void addCategoryTest() throws Exception {
6868 final var response = mvc .perform (post ("/categories" )
6969 .content (categoryRequest )
7070 .contentType (MediaType .APPLICATION_JSON ))
71- .andExpect (status ().isOk ())
71+ .andExpect (status ().isCreated ())
7272 .andReturn ()
7373 .getResponse ();
7474 final var resultJsonNode = mapper .readTree (response .getContentAsString ());
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ void addProductWithValidObjectReturnsProductAndOkStatus() throws Exception {
136136 .content (newProduct )
137137 .contentType (MediaType .APPLICATION_JSON ));
138138 //then
139- actualPerformResult .andExpect (status ().isOk ());
139+ actualPerformResult .andExpect (status ().isCreated ());
140140 ObjectMapper mapper = new ObjectMapper ();
141141 assertEquals (mapper .readTree (newProduct ).get ("name" ), mapper .readTree (actualPerformResult .andReturn ()
142142 .getResponse ().getContentAsString ()).get ("name" ));
You can’t perform that action at this time.
0 commit comments