parent
d58102e32c
commit
526a90bc8c
|
@ -43,11 +43,9 @@ public class EscapeHtmlFilterIntegrationTest {
|
|||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
mockMvc.perform(MockMvcRequestBuilders.post(URI.create("/save"))
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(objectMapper.writeValueAsString(requestBody)))
|
||||
.andExpect(MockMvcResultMatchers.status()
|
||||
.isCreated())
|
||||
.andExpect(MockMvcResultMatchers.content()
|
||||
.json(objectMapper.writeValueAsString(expectedResponseBody)));
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(objectMapper.writeValueAsString(requestBody))).andExpect(MockMvcResultMatchers.status()
|
||||
.isCreated()).andExpect(MockMvcResultMatchers.content()
|
||||
.json(objectMapper.writeValueAsString(expectedResponseBody)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,9 +39,8 @@ public class EscapeHtmlInterceptorIntegrationTest {
|
|||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
mockMvc.perform(MockMvcRequestBuilders.post(URI.create("/save"))
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(objectMapper.writeValueAsString(requestBody)))
|
||||
.andExpect(MockMvcResultMatchers.status()
|
||||
.is4xxClientError());
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(objectMapper.writeValueAsString(requestBody))).andExpect(MockMvcResultMatchers.status()
|
||||
.is4xxClientError());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue