Skip to content

Commit

Permalink
CIRC-2050 add errorMessage check
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-barannyk committed Apr 1, 2024
1 parent 7f4a027 commit 1832e8e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/test/java/api/requests/AllowedServicePointsAPITests.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import static org.folio.circulation.domain.RequestType.HOLD;
import static org.folio.circulation.domain.RequestType.PAGE;
import static org.folio.circulation.domain.RequestType.RECALL;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
Expand Down Expand Up @@ -782,7 +783,9 @@ void shouldUseStubItemParameterInCirculationRuleMatchingWhenPresent() {
allowedPageServicePoints = response.getJsonArray(PAGE.getValue());
assertServicePointsMatch(allowedPageServicePoints, List.of(cd1, cd2, cd4, cd5));

getCreateOp(requesterId, instanceId, null, "invalid", HttpStatus.SC_BAD_REQUEST);
Response errorResponse = getCreateOp(requesterId, instanceId, null, "invalid",
HttpStatus.SC_BAD_REQUEST);
assertThat(errorResponse.getBody(), is("UseStubItem is not a valid value: invalid."));
}

private void assertServicePointsMatch(JsonArray response,
Expand Down

0 comments on commit 1832e8e

Please sign in to comment.