From e76f61278bdff8f3d235e0da962a6800bbc69506 Mon Sep 17 00:00:00 2001 From: cagache Date: Fri, 13 Jan 2017 12:51:51 +0200 Subject: [PATCH] fix put for multi-byte content --- .../rest/comments/UpdateCommentFullTests.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/e2e-test/java/org/alfresco/rest/comments/UpdateCommentFullTests.java b/e2e-test/java/org/alfresco/rest/comments/UpdateCommentFullTests.java index aa1b74dad..f15aba274 100644 --- a/e2e-test/java/org/alfresco/rest/comments/UpdateCommentFullTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/UpdateCommentFullTests.java @@ -201,7 +201,6 @@ public class UpdateCommentFullTests extends RestTest @Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.FULL }) public void managerIsAbleToUpdateACommentWithMultiByteContent() throws JsonToModelConversionException, Exception { - //TODO update comment with multi-byte content - verify FileModel file = dataContent.usingSite(siteModel).usingUser(adminUserModel).createContent(DocumentType.TEXT_PLAIN); String multiByte = "\ufeff\u6768\u6728\u91d1"; @@ -277,10 +276,10 @@ public class UpdateCommentFullTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.CREATED); restClient.authenticateUser(newUser).withCoreAPI().usingResource(file).updateComment(commentModel, updatedComment); - restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED); - restClient.assertLastError().getErrorKey().contains(RestErrorModel.PERMISSION_DENIED_ERRORKEY); - 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) + .descriptionURLIs(RestErrorModel.RESTAPIEXPLORER) + .stackTraceIs(RestErrorModel.STACKTRACE) + .containsErrorKey(RestErrorModel.PERMISSION_DENIED_ERRORKEY); } } \ No newline at end of file