Skip to content

Commit

Permalink
expect JSON rather than HTML IQSS#4516
Browse files Browse the repository at this point in the history
The behavior changed after pull request IQSS#4509 was merged.
  • Loading branch information
pdurbin committed Mar 16, 2018
1 parent 02be130 commit 00ceb33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/java/edu/harvard/iq/dataverse/api/SwordIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,15 @@ public void testCreateDataverseCreateDatasetUploadFileDownloadFileEditTitle() {
assertEquals("trees.png", filename);

Response attemptToDownloadUnpublishedFileWithoutApiToken = UtilIT.downloadFile(fileId);
attemptToDownloadUnpublishedFileWithoutApiToken.prettyPrint();
attemptToDownloadUnpublishedFileWithoutApiToken.then().assertThat()
.body("html.head.title", equalTo("403 Not Authorized - Root"))
.body("status", equalTo("ERROR"))
.statusCode(FORBIDDEN.getStatusCode());

Response attemptToDownloadUnpublishedFileUnauthApiToken = UtilIT.downloadFile(fileId, apiTokenNoPrivs);
attemptToDownloadUnpublishedFileUnauthApiToken.prettyPrint();
attemptToDownloadUnpublishedFileUnauthApiToken.then().assertThat()
.body("html.head.title", equalTo("403 Not Authorized - Root"))
.body("status", equalTo("ERROR"))
.statusCode(FORBIDDEN.getStatusCode());

Response downloadUnpublishedFileWithValidApiToken = UtilIT.downloadFile(fileId, apiToken);
Expand Down

0 comments on commit 00ceb33

Please sign in to comment.