Skip to content

Commit

Permalink
Merge pull request IQSS#8115 from IQSS/8114_test_fixes
Browse files Browse the repository at this point in the history
Update failing tests
  • Loading branch information
kcondon authored Sep 27, 2021
2 parents 314e028 + 36a1b0a commit b43cda0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ public void testCuratorSendsCommentsToAuthor() throws InterruptedException {
// Whoops, the curator forgot to give the author permission to create a dataset.
Response noPermToCreateDataset = UtilIT.createRandomDatasetViaNativeApi(dataverseAlias, authorApiToken);
noPermToCreateDataset.prettyPrint();
noPermToCreateDataset.then().assertThat()
.body("message", equalTo("User @" + authorUsername + " is not permitted to perform requested action."))
.statusCode(UNAUTHORIZED.getStatusCode());
noPermToCreateDataset.then().assertThat().statusCode(UNAUTHORIZED.getStatusCode());

Response grantAuthorAddDataset = UtilIT.grantRoleOnDataverse(dataverseAlias, DataverseRole.DS_CONTRIBUTOR.toString(), "@" + authorUsername, curatorApiToken);
grantAuthorAddDataset.prettyPrint();
Expand Down
6 changes: 2 additions & 4 deletions src/test/java/edu/harvard/iq/dataverse/api/MoveIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ public void testMoveDataset() {
// Whoops, the curator forgot to give the author permission to create a dataset.
Response noPermToCreateDataset = UtilIT.createRandomDatasetViaNativeApi(curatorDataverseAlias1, authorApiToken);
noPermToCreateDataset.prettyPrint();
noPermToCreateDataset.then().assertThat()
.statusCode(UNAUTHORIZED.getStatusCode())
.body("message", equalTo("User @" + authorUsername + " is not permitted to perform requested action."));

noPermToCreateDataset.then().assertThat().statusCode(UNAUTHORIZED.getStatusCode());

Response grantAuthorAddDataset = UtilIT.grantRoleOnDataverse(curatorDataverseAlias1, DataverseRole.DS_CONTRIBUTOR.toString(), "@" + authorUsername, curatorApiToken);
grantAuthorAddDataset.prettyPrint();
grantAuthorAddDataset.then().assertThat()
Expand Down

0 comments on commit b43cda0

Please sign in to comment.