diff --git a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java index be5189f6e..fbd91f837 100644 --- a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java @@ -102,4 +102,14 @@ public class DeleteCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN.toString()); } + @TestRail(section = { "rest-api", + "comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + public void managerIsNotAbleToDeleteCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception + { + UserModel nonexistentModel = new UserModel("nonexistentUser", "nonexistentPassword"); + restClient.authenticateUser(nonexistentModel); + commentsAPI.deleteComment(document.getNodeRef(), commentId); + commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED.toString()); + } + }