Skip to content

Commit

Permalink
EFRS-1334: Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VolodymyrBushko committed Nov 18, 2022
1 parent 5044d70 commit 03be452
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -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}"));
Expand Down

0 comments on commit 03be452

Please sign in to comment.