Skip to content

Commit

Permalink
add isRelease field to isPartOf
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwinship committed Oct 8, 2024
1 parent 4afcfb2 commit 7cc81e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ private static JsonObjectBuilder addEmbeddedOwnerObject(DvObject dvo, JsonObject
ownerObject.add("type", "DATAVERSE");
Dataverse in = (Dataverse) dvo;
ownerObject.add("identifier", in.getAlias());
ownerObject.add("isReleased", in.isReleased());
}

if (dvo.isInstanceofDataset()) {
Expand Down
7 changes: 5 additions & 2 deletions src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -2134,8 +2134,11 @@ public void testGetDatasetOwners() {

Response getDatasetWithOwners = UtilIT.getDatasetWithOwners(persistentId, apiToken, true);
getDatasetWithOwners.prettyPrint();
getDatasetWithOwners.then().assertThat().body("data.isPartOf.identifier", equalTo(dataverseAlias));

getDatasetWithOwners.then().assertThat().body("data.isPartOf.identifier", equalTo(dataverseAlias));
getDatasetWithOwners.then().assertThat().body("data.isPartOf.isReleased", equalTo(false));
getDatasetWithOwners.then().assertThat().body("data.isPartOf.isPartOf.identifier", equalTo("root"));
getDatasetWithOwners.then().assertThat().body("data.isPartOf.isPartOf.isReleased", equalTo(true));

Response destroyDatasetResponse = UtilIT.destroyDataset(datasetId, apiToken);
assertEquals(200, destroyDatasetResponse.getStatusCode());

Expand Down

0 comments on commit 7cc81e0

Please sign in to comment.