Closed
Description
When using MockMvc
the status reason phrase can be asserted like this:
mockMvc
.perform(get("/something"))
.andExpect(status().isNotFound())
.andExpect(status().reason("Could not find xyz"))
This cannot be achieved using MockMvcTester
:
val result = mockMvc.get().uri("/something")
assertThat(result)
.hasStatus(HttpStatus.NOT_FOUND)
// ??? How to assert the status reason phrase
Is there something I'm missing?