diff --git a/java/admin/src/test/java/com/exadel/frs/controller/ModelControllerTest.java b/java/admin/src/test/java/com/exadel/frs/controller/ModelControllerTest.java index e38e9e7131..a3a76fb620 100644 --- a/java/admin/src/test/java/com/exadel/frs/controller/ModelControllerTest.java +++ b/java/admin/src/test/java/com/exadel/frs/controller/ModelControllerTest.java @@ -108,10 +108,6 @@ void shouldReturnMessageAndCodeWhenModelNameIsMissingOnUpdate() throws Exception @Test void shouldReturnErrorMessageWhenNameIsMissingOnCreateNewModel() throws Exception { - val bodyWithEmptyName = new ModelCreateDto(); - bodyWithEmptyName.setName(""); - bodyWithEmptyName.setType("RECOGNITION"); - val bodyWithNoName = new ModelCreateDto(); bodyWithNoName.setType("RECOGNITION"); @@ -120,10 +116,6 @@ void shouldReturnErrorMessageWhenNameIsMissingOnCreateNewModel() throws Exceptio .with(user(buildUser())) .contentType(APPLICATION_JSON); - mockMvc.perform(createNewModelRequest.content(mapper.writeValueAsString(bodyWithEmptyName))) - .andExpect(status().isBadRequest()) - .andExpect(content().string("{\"message\":\"Model name size must be between 1 and 50\",\"code\":26}")); - mockMvc.perform(createNewModelRequest.content(mapper.writeValueAsString(bodyWithNoName))) .andExpect(status().isBadRequest()) .andExpect(content().string("{\"message\":\"Model name cannot be empty\",\"code\":26}"));