Skip to content

Commit

Permalink
fix(java): fix unit test on captions due to regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibaultBee authored Dec 5, 2023
1 parent d8e1efe commit 4cdc0cc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ public void responseWithStatus200Test() throws ApiException {
}

@Test
@DisplayName("400 response")
@DisplayName("400-0 response")
public void responseWithStatus400Test() throws ApiException {
answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400.json"));
answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-0.json"));

assertThatThrownBy(() -> api.update("vi4k0jvEUuaTdRAEjQ4Prklg", "en", new CaptionsUpdatePayload()))
assertThatThrownBy(() -> api.update("vi4k0jvEUuaTdRAEjQ4Prklg", "en_", new CaptionsUpdatePayload()))
.isInstanceOf(ApiException.class)
.satisfies(e -> assertThat(((ApiException) e).getCode()).isEqualTo(400))
.hasMessage("string (required)");
.hasMessage("An attribute is invalid.");
}

@Test
Expand Down

0 comments on commit 4cdc0cc

Please sign in to comment.