From 597143297af4b5344f832f462d339b4dbb58dd3c Mon Sep 17 00:00:00 2001 From: Kapil Verma Date: Mon, 23 Sep 2024 16:44:37 +0530 Subject: [PATCH] CIRC-2148: Fixed PR comments --- .../resources/RequestFromRepresentationService.java | 2 -- .../java/api/requests/RequestsAPIRetrievalTests.java | 9 +++------ src/test/java/api/support/fakes/FakeStorageModule.java | 4 +++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/folio/circulation/resources/RequestFromRepresentationService.java b/src/main/java/org/folio/circulation/resources/RequestFromRepresentationService.java index 17b3a4e417..a11b86d231 100644 --- a/src/main/java/org/folio/circulation/resources/RequestFromRepresentationService.java +++ b/src/main/java/org/folio/circulation/resources/RequestFromRepresentationService.java @@ -582,8 +582,6 @@ private Request removeRelatedRecordInformation(Request request) { if (printDetails != null && printDetails.containsKey("lastPrintRequester")) { printDetails.remove("lastPrintRequester"); } - - return request; } diff --git a/src/test/java/api/requests/RequestsAPIRetrievalTests.java b/src/test/java/api/requests/RequestsAPIRetrievalTests.java index cb9ad9db12..3c71fcc441 100644 --- a/src/test/java/api/requests/RequestsAPIRetrievalTests.java +++ b/src/test/java/api/requests/RequestsAPIRetrievalTests.java @@ -875,9 +875,7 @@ void printDetailsTest() { UserResource printDetailsRequester = usersFixture.charlotte(); UUID printDetailsRequesterId = printDetailsRequester.getId(); final IndividualResource smallAngryPlanet = itemsFixture.basedUponSmallAngryPlanet(); - final IndividualResource workAddressType = addressTypesFixture.work(); - final IndividualResource charlotte = usersFixture.charlotte( builder -> builder.withAddress( new Address(workAddressType.getId(), @@ -888,15 +886,14 @@ void printDetailsTest() { "Fake postal code", "Fake country code"))); - requestsFixture.place(new RequestBuilder() .page() .forItem(smallAngryPlanet) .deliverToAddress(workAddressType.getId()) .by(charlotte) - .withPrintDetails(new RequestBuilder.PrintDetails(49, printDetailsRequesterId.toString(), true, "2024-09-16T11:58:22" + - ".295+00:00"))); - + .withPrintDetails(new RequestBuilder + .PrintDetails(49, printDetailsRequesterId.toString(), + true, "2024-09-16T11:58:22.295+00:00"))); final MultipleJsonRecords requests = requestsFixture.getRequests( queryFromTemplate("printDetails.isPrinted==%s", "true"), diff --git a/src/test/java/api/support/fakes/FakeStorageModule.java b/src/test/java/api/support/fakes/FakeStorageModule.java index a3cf6cdff1..2224d6b95a 100644 --- a/src/test/java/api/support/fakes/FakeStorageModule.java +++ b/src/test/java/api/support/fakes/FakeStorageModule.java @@ -390,7 +390,9 @@ private void getMany(RoutingContext routingContext) { result.put(collectionPropertyName, new JsonArray(pagedItems)); result.put("totalRecords", filteredItems.size()); - + if(collectionPropertyName.equalsIgnoreCase("requests")) { + System.out.println(); + } log.debug("Found {} resources: {}", recordTypeName, result.encodePrettily()); HttpServerResponse response = routingContext.response();