From a1375172ea476ad423936b0083b0e98383443797 Mon Sep 17 00:00:00 2001 From: cagache Date: Fri, 27 Jan 2017 16:31:50 +0200 Subject: [PATCH] updated testcase based on REPO-1924 comments --- .../rest/workflow/tasks/UpdateTaskCoreTests.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskCoreTests.java index 50c98b054..cdfbaffdd 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskCoreTests.java @@ -143,11 +143,11 @@ public class UpdateTaskCoreTests extends RestTest restTaskModel.assertThat().field("id").is(taskModel.getId()).and().field("state").is("unclaimed"); } - @Bug(id = "MNT-17407") + @Bug(id = "REPO-1924") @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, - TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify owner can update task from delegated to completed and response is 200") + TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify owner can not update task from delegated to completed and response is 422") @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) - public void taskOwnerCanUpdateTaskFromDelegatedToCompleted() throws Exception + public void taskOwnerCanNotUpdateTaskFromDelegatedToCompleted() throws Exception { restClient.authenticateUser(userModel).withParams("select=state,assignee").withWorkflowAPI().usingTask(taskModel); HashMap body = new HashMap(); @@ -161,9 +161,8 @@ public class UpdateTaskCoreTests extends RestTest restTaskModel.assertThat().field("id").is(taskModel.getId()).and().field("state").is("delegated").and().field("assignee") .is(assigneeUser.getUsername()); - restTaskModel = restClient.authenticateUser(userModel).withParams("select=state").withWorkflowAPI().usingTask(taskModel).updateTask("completed"); - restClient.assertStatusCodeIs(HttpStatus.OK); - restTaskModel.assertThat().field("id").is(taskModel.getId()).and().field("state").is("completed"); + restClient.authenticateUser(userModel).withParams("select=state").withWorkflowAPI().usingTask(taskModel).updateTask("completed"); + restClient.assertStatusCodeIs(HttpStatus.UNPROCESSABLE_ENTITY).assertLastError().containsSummary(RestErrorModel.DELEGATED_TASK_CAN_NOT_BE_COMPLETED); } @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW,