Skip to content

Commit

Permalink
Added: tweaks to DataversesIT listMetadataBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
GPortas committed Oct 31, 2024
1 parent cfe9dbd commit f317ab0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/java/edu/harvard/iq/dataverse/api/DataversesIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -911,11 +911,13 @@ public void testListMetadataBlocks() {
createDataverseResponse.then().assertThat().statusCode(CREATED.getStatusCode());
String dataverseAlias = UtilIT.getAliasFromResponse(createDataverseResponse);

// New Dataverse should return just the citation block and its displayOnCreate fields when onlyDisplayedOnCreate=true and returnDatasetFieldTypes=true
Response listMetadataBlocks = UtilIT.listMetadataBlocks(dataverseAlias, true, true, apiToken);
listMetadataBlocks.prettyPrint();
listMetadataBlocks.then().assertThat().statusCode(OK.getStatusCode());
listMetadataBlocks.then().assertThat()
.statusCode(OK.getStatusCode())
.body("data.size()", equalTo(1))
.body("data[0].name", is("citation"))
.body("data[0].fields.title.displayOnCreate", equalTo(true))
.body("data[0].fields.size()", is(28));
Expand Down

0 comments on commit f317ab0

Please sign in to comment.