diff --git a/mod-audit-server/src/test/java/org/folio/rest/impl/AuditDataAcquisitionAPITest.java b/mod-audit-server/src/test/java/org/folio/rest/impl/AuditDataAcquisitionAPITest.java index c6be99d..5a35b6a 100644 --- a/mod-audit-server/src/test/java/org/folio/rest/impl/AuditDataAcquisitionAPITest.java +++ b/mod-audit-server/src/test/java/org/folio/rest/impl/AuditDataAcquisitionAPITest.java @@ -128,7 +128,7 @@ void shouldReturnPieceEventsOnGetByPieceId() { PieceAuditEvent pieceAuditEvent = new PieceAuditEvent() .withId(UUID.randomUUID().toString()) .withAction(PieceAuditEvent.Action.CREATE) - .withPieceId("123e4567-e89b-12d3-a456-426614174005") + .withPieceId(PIECE_ID) .withUserId(UUID.randomUUID().toString()) .withEventDate(new Date()) .withActionDate(new Date()) @@ -142,19 +142,22 @@ void shouldReturnPieceEventsOnGetByPieceId() { .body(containsString("pieceAuditEvents")).body(containsString("totalItems")); given().header(CONTENT_TYPE).header(TENANT).header(PERMS) - .get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005") + .get(ACQ_AUDIT_PIECE_PATH + PIECE_ID) .then().log().all().statusCode(200) - .body(containsString("123e4567-e89b-12d3-a456-426614174005")); + .body(containsString(PIECE_ID)); given().header(CONTENT_TYPE).header(TENANT).header(PERMS) - .get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005" +"?limit=1") + .get(ACQ_AUDIT_PIECE_PATH + PIECE_ID +"?limit=1") .then().log().all().statusCode(200) - .body(containsString("123e4567-e89b-12d3-a456-426614174005")); + .body(containsString(PIECE_ID)); - given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005" +"?sortBy=action_date").then().log().all().statusCode(200) - .body(containsString("123e4567-e89b-12d3-a456-426614174005")); + given().header(CONTENT_TYPE).header(TENANT).header(PERMS) + .get(ACQ_AUDIT_PIECE_PATH + PIECE_ID + "?sortBy=action_date") + .then().log().all().statusCode(200) + .body(containsString(PIECE_ID)); - given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005" + 123).then().log().all().statusCode(500) + given().header(CONTENT_TYPE).header(TENANT).header(PERMS) + .get(ACQ_AUDIT_PIECE_PATH + PIECE_ID + 123).then().log().all().statusCode(500) .body(containsString("UUID string too large")); }