This is an extension for HTTP status assertions in the AbstractHttpServletResponseAssert
, which was introduced in version 6.2. With this extension, it is possible to write test assertions like this
MvcTestResult result = mockMvcTester.get().uri("/example").exchange();
assertThat(result).httpStatus().isUnauthorized();
which is inspired by the "old" MockMvc
status assertions:
mockMvc.perform(get("/example"))
.andExpect(status().isUnauthorized());
No breaking changes introduced.