Skip to content

Commit

Permalink
added integration test: cecking child / parent logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ffritze committed Aug 27, 2024
1 parent 65eee38 commit edf12ec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 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 @@ -852,6 +852,16 @@ public void testListMetadataBlocks() {
.body("data[0].displayName", equalTo("Citation Metadata"))
.body("data[0].fields", not(equalTo(null)))
.body("data.size()", equalTo(1));

// Checking child / parent logic
listMetadataBlocksResponse = UtilIT.getMetadataBlock("citation");
listMetadataBlocksResponse.then().assertThat().statusCode(OK.getStatusCode());
listMetadataBlocksResponse.then().assertThat()
.statusCode(OK.getStatusCode())
.body("data[0].displayName", equalTo("Citation Metadata"))
.body("data[0].fields", not(equalTo(null)))
.body("data[0].fields.otherIdAgency", equalTo(null))
.body("data[0].fields.otherId.childFields.size()", equalTo(2));
}

@Test
Expand Down

0 comments on commit edf12ec

Please sign in to comment.