Skip to content

Commit c763f78

Browse files
committed
Fixed tests to run with repo-core 1.2.5
1 parent 49c18c6 commit c763f78

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/test/java/edu/kit/datamanager/repo/test/integration/DataResourceControllerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,9 +798,9 @@ public void testDeleteResourceAsAdmin() throws Exception {
798798

799799
this.mockMvc.perform(delete("/api/v1/dataresources/" + sampleResource.getId()).header("If-Match", etag).header(HttpHeaders.AUTHORIZATION,
800800
"Bearer " + adminToken).contentType("application/json")).andExpect(status().isNoContent());
801-
//from now on, the resource should be in state GONE...HTTP GET should fail
801+
//from now on, the resource should be in state GONE...HTTP GET still succeeds as admin (since repo-core 1.2.5)
802802
this.mockMvc.perform(get("/api/v1/dataresources/" + sampleResource.getId()).header(HttpHeaders.AUTHORIZATION,
803-
"Bearer " + adminToken)).andDo(print()).andExpect(status().isNotFound());
803+
"Bearer " + adminToken)).andDo(print()).andExpect(status().isOk());
804804

805805
}
806806

src/test/java/edu/kit/datamanager/repo/test/integration/DataResourceControllerTestWithoutVersioning.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,9 @@ public void testDeleteResourceAsAdmin() throws Exception {
800800

801801
this.mockMvc.perform(delete("/api/v1/dataresources/" + sampleResource.getId()).header("If-Match", etag).header(HttpHeaders.AUTHORIZATION,
802802
"Bearer " + adminToken).contentType("application/json")).andExpect(status().isNoContent());
803-
//from now on, the resource should be in state GONE...HTTP GET should fail
803+
//from now on, the resource should be in state GONE...HTTP GET still succeeds as admin (since repo-core 1.2.5)
804804
this.mockMvc.perform(get("/api/v1/dataresources/" + sampleResource.getId()).header(HttpHeaders.AUTHORIZATION,
805-
"Bearer " + adminToken)).andDo(print()).andExpect(status().isNotFound());
805+
"Bearer " + adminToken)).andDo(print()).andExpect(status().isOk());
806806

807807
}
808808

src/test/java/edu/kit/datamanager/repo/test/integration/DataResourceControllerTestWithoutVersioningAndAudit.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,9 @@ public void testDeleteResourceAsAdmin() throws Exception {
801801

802802
this.mockMvc.perform(delete("/api/v1/dataresources/" + sampleResource.getId()).header("If-Match", etag).header(HttpHeaders.AUTHORIZATION,
803803
"Bearer " + adminToken).contentType("application/json")).andExpect(status().isNoContent());
804-
//from now on, the resource should be in state GONE...HTTP GET should fail
804+
//from now on, the resource should be in state GONE...HTTP GET still succeeds as admin (since repo-core 1.2.5)
805805
this.mockMvc.perform(get("/api/v1/dataresources/" + sampleResource.getId()).header(HttpHeaders.AUTHORIZATION,
806-
"Bearer " + adminToken)).andDo(print()).andExpect(status().isNotFound());
806+
"Bearer " + adminToken)).andDo(print()).andExpect(status().isOk());
807807

808808
}
809809

0 commit comments

Comments
 (0)