Skip to content

Commit

Permalink
[DSC-1960] Fixes IT failures of SubmissionDeduplicationRestIT
Browse files Browse the repository at this point in the history
  • Loading branch information
vins01-4science committed Oct 14, 2024
1 parent 9255c0b commit f58cc00
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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
Expand Down

0 comments on commit f58cc00

Please sign in to comment.