diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDeduplicationRestIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDeduplicationRestIT.java index b47e543aee15..01c31403b319 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDeduplicationRestIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/SubmissionDeduplicationRestIT.java @@ -986,7 +986,7 @@ public void workflowItemsAndItemTest() throws Exception { getClient(submitterTocken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); // execute the patch getClient(reviewerToken) @@ -1054,7 +1054,7 @@ public void workflowItemsAndItemTest() throws Exception { getClient(submitterTocken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); // patch operation getClient(reviewerToken) @@ -1216,7 +1216,7 @@ public void workflowItemsAndWorkspaceItemTest() throws Exception { // check security getClient(submitterToken).perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) - .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)).andExpect(status().isUnprocessableEntity()); + .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)).andExpect(status().isForbidden()); // make patch getClient(reviewerToken) @@ -1289,7 +1289,7 @@ public void workflowItemsAndWorkspaceItemTest() throws Exception { getClient(submitterToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); getClient(reviewerToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()) @@ -1454,7 +1454,7 @@ public void workflowItemCheckFailures() throws Exception { getClient(authToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); // Ask for a patch with a number as UUID patchBody = null; @@ -1466,7 +1466,7 @@ public void workflowItemCheckFailures() throws Exception { getClient(authToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); // Ask for a patch with an invalid operation value.clear(); @@ -1481,7 +1481,7 @@ public void workflowItemCheckFailures() throws Exception { getClient(authToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); // Ask for a patch with wrong type value.clear(); @@ -1496,7 +1496,7 @@ public void workflowItemCheckFailures() throws Exception { getClient(authToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); // Ask for a patch with the wrong decision type value.clear(); @@ -1510,7 +1510,7 @@ public void workflowItemCheckFailures() throws Exception { getClient(authToken) .perform(patch("/api/workflow/workflowitems/" + witem.getID()).content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) - .andExpect(status().isUnprocessableEntity()); + .andExpect(status().isForbidden()); } @Test