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 Sep 25, 2024
1 parent d40ce32 commit eaa8e5d
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 @@ -2080,8 +2080,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 eaa8e5d

Please sign in to comment.