Skip to content

Commit a519f0e

Browse files
BENCH-162 Reflected changes within tests
1 parent 1b09ce8 commit a519f0e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/java/com/answerdigital/answerking/controller/CategoryControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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());

src/test/java/com/answerdigital/answerking/controller/ProductControllerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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"));

0 commit comments

Comments
 (0)