Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Dec 19, 2024
1 parent 34f160c commit 1df8e11
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void testFromXContentThrowsExceptionWhenUserFieldIsMissing() throws IOExc
exception = assertThrows(IllegalArgumentException.class, () -> CreatedBy.fromXContent(parser));
}

MatcherAssert.assertThat("user field is required", equalTo(exception.getMessage()));
MatcherAssert.assertThat("user is required", equalTo(exception.getMessage()));
}

public void testFromXContentWithEmptyInput() throws IOException {
Expand Down Expand Up @@ -120,7 +120,7 @@ public void testFromXContentWithMissingUser() throws IOException {
exception = assertThrows(IllegalArgumentException.class, () -> CreatedBy.fromXContent(parser));
}

MatcherAssert.assertThat("user field is required", equalTo(exception.getMessage()));
MatcherAssert.assertThat("user is required", equalTo(exception.getMessage()));
}

public void testFromXContentWithMissingUserField() throws IOException {
Expand Down Expand Up @@ -266,7 +266,7 @@ public void test_fromXContent_missingUserField() throws IOException {
exception = assertThrows(IllegalArgumentException.class, () -> { CreatedBy.fromXContent(parser); });
}

MatcherAssert.assertThat("user field is required", equalTo(exception.getMessage()));
MatcherAssert.assertThat("user is required", equalTo(exception.getMessage()));
}

public void test_toXContent_serializesCorrectly() throws IOException {
Expand Down

0 comments on commit 1df8e11

Please sign in to comment.