Skip to content

Commit

Permalink
Merged in CST-12820-coar-direct-to-the-service-url (pull request DSpa…
Browse files Browse the repository at this point in the history
…ce#1367)

CST-12820 fix service url on NotifyRequestStatus response
  • Loading branch information
frabacche committed Nov 28, 2023
2 parents 3b41cca + 5771aeb commit 87c512f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public NotifyRequestStatus findRequestsByItem(Context context, Item item) throws
for (LDNMessageEntity msg : msgs) {
RequestStatus offer = new RequestStatus();
offer.setServiceName(msg.getTarget() == null ? "Unknown Service" : msg.getTarget().getName());
offer.setServiceUrl(msg.getTarget() == null ? "" : msg.getTarget().getLdnUrl());
offer.setServiceUrl(msg.getTarget() == null ? "" : msg.getTarget().getUrl());
List<LDNMessageEntity> acks = ldnMessageDao.findAllRelatedMessagesByItem(
context, msg, item, "Accept", "TentativeReject", "TentativeAccept", "Announce");
if (acks == null || acks.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void oneStatusReviewedTest() throws Exception {
.andExpect(jsonPath("$.notifyStatus").isArray())
.andExpect(jsonPath("$.notifyStatus").isNotEmpty())
.andExpect(jsonPath("$.notifyStatus[0].status").value("REQUESTED"))
.andExpect(jsonPath("$.notifyStatus[0].serviceUrl").value("https://review-service.com/inbox/about/"))
;
}

Expand Down Expand Up @@ -159,6 +160,7 @@ public void oneStatusRejectedTest() throws Exception {
.andExpect(jsonPath("$.notifyStatus").isArray())
.andExpect(jsonPath("$.notifyStatus").isNotEmpty())
.andExpect(jsonPath("$.notifyStatus[0].status").value("REJECTED"))
.andExpect(jsonPath("$.notifyStatus[0].serviceUrl").value("https://review-service.com/inbox/about/"))
;
}
}

0 comments on commit 87c512f

Please sign in to comment.