From af567fc3cc939f8fc133e5750aca21c9e8a90e9e Mon Sep 17 00:00:00 2001 From: cagache Date: Fri, 13 Jan 2017 10:26:01 +0200 Subject: [PATCH] updated 2 scenarios --- .../rest/comments/DeleteCommentFullTests.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentFullTests.java b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentFullTests.java index 61f0a4386..8386b5a39 100644 --- a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentFullTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentFullTests.java @@ -113,11 +113,11 @@ public class DeleteCommentFullTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.CREATED); restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)) .withCoreAPI().usingResource(file).deleteComment(commentModel); - restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED); - restClient.assertLastError().getErrorKey().contains("PermissionDenied"); - restClient.assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED); - restClient.assertLastError().getDescriptionURL().contains("https://api-explorer.alfresco.com"); - restClient.assertLastError().getStackTrace().contains("For security reasons the stack trace is no longer displayed"); + restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED) + .statusCodeIs(HttpStatus.FORBIDDEN) + .descriptionURLIs(RestErrorModel.RESTAPIEXPLORER) + .stackTraceIs(RestErrorModel.STACKTRACE) + .containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY); comments = restClient.authenticateUser(adminUserModel).withCoreAPI().usingResource(file).getNodeComments(); restClient.assertStatusCodeIs(HttpStatus.OK); @@ -136,6 +136,7 @@ public class DeleteCommentFullTests extends RestTest commentModel = restClient.authenticateUser(adminUserModel).withCoreAPI().usingResource(file).addComment(comment); restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)) .withCoreAPI().usingResource(file).deleteComment(commentModel); + restClient.assertStatusCodeIs(HttpStatus.NO_CONTENT); } @TestRail(section = { TestGroup.REST_API,TestGroup.COMMENTS },