Skip to content

Commit

Permalink
#838 - fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
grabdoc committed Jan 20, 2025
1 parent 50504b5 commit 9fbabde
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import static org.springframework.http.MediaType.APPLICATION_JSON;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.RestDocumentationRequestBuilders.delete;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

Expand All @@ -37,6 +38,7 @@ void delete_single_record() throws Exception {
void delete_all_records_with_allow_safe_delete_true() throws Exception {
mockMvc.perform(delete(VERSION + "/mariadb/director")
.accept(APPLICATION_JSON))
.andDo(print())
.andExpect(status().isBadRequest())
.andExpect(jsonPath("$.detail",
containsString("Invalid delete operation , safe set to true")))
Expand All @@ -49,10 +51,10 @@ void delete_all_records_with_allow_safe_delete_true() throws Exception {
void column_does_not_exist() throws Exception {
mockMvc.perform(delete(VERSION + "/mariadb/director")
.accept(APPLICATION_JSON)
.param("filter", "_name==\"Alex\""))
.param("filter", "_name==\"Alex\"")).andDo(print())
.andExpect(status().isNotFound())
.andExpect(jsonPath("$.detail",
containsString("Missing column director._name")))
containsString("Column not found director._name")))
//.andDo(print())
.andDo(document("mariadb-column-not-exists"));
}
Expand Down

0 comments on commit 9fbabde

Please sign in to comment.