mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Fix the api-explorer version, there is no 5.2.2-SNAPSHOT version yet.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137776 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -808,7 +808,7 @@ public class TestNodeComments extends EnterpriseTestApi
|
||||
}
|
||||
}, person13.getId(), network1.getId());
|
||||
|
||||
// change to not lock owner
|
||||
// change to not lock owner and not node owner
|
||||
publicApiClient.setRequestContext(new RequestContext(network1.getId(), person14.getId()));
|
||||
|
||||
// test GET for a locked node
|
||||
@@ -845,17 +845,62 @@ public class TestNodeComments extends EnterpriseTestApi
|
||||
assertEquals(HttpStatus.SC_CONFLICT, e.getHttpResponse().getStatusCode());
|
||||
}
|
||||
|
||||
//TODO Insert after fixing REPO-2577
|
||||
// test DELETE for a locked node
|
||||
try
|
||||
{
|
||||
commentsProxy.removeNodeComment(nodeRef1.getId(), createdComment.getId());
|
||||
// try
|
||||
// {
|
||||
// commentsProxy.removeNodeComment(nodeRef1.getId(), createdComment.getId());
|
||||
//
|
||||
// fail("");
|
||||
// }
|
||||
// catch (PublicApiException e)
|
||||
// {
|
||||
// assertEquals(HttpStatus.SC_CONFLICT, e.getHttpResponse().getStatusCode());
|
||||
// }
|
||||
|
||||
fail("");
|
||||
}
|
||||
catch (PublicApiException e)
|
||||
{
|
||||
assertEquals(HttpStatus.SC_FORBIDDEN, e.getHttpResponse().getStatusCode());
|
||||
}
|
||||
// change to node creator
|
||||
publicApiClient.setRequestContext(new RequestContext(network1.getId(), person11.getId()));
|
||||
|
||||
// test POST for a locked node
|
||||
try
|
||||
{
|
||||
comment = new Comment();
|
||||
comment.setContent("my other comment");
|
||||
createdComment = commentsProxy.createNodeComment(nodeRef1.getId(), comment);
|
||||
|
||||
fail("");
|
||||
}
|
||||
catch (PublicApiException e)
|
||||
{
|
||||
assertEquals(HttpStatus.SC_CONFLICT, e.getHttpResponse().getStatusCode());
|
||||
}
|
||||
|
||||
// test PUT for a locked node
|
||||
try
|
||||
{
|
||||
Comment updatedComment = new Comment();
|
||||
updatedComment.setContent("my comment");
|
||||
commentsProxy.updateNodeComment(nodeRef1.getId(), createdComment.getId(), updatedComment);
|
||||
|
||||
fail("");
|
||||
}
|
||||
catch (PublicApiException e)
|
||||
{
|
||||
assertEquals(HttpStatus.SC_CONFLICT, e.getHttpResponse().getStatusCode());
|
||||
}
|
||||
|
||||
//TODO Insert after fixing REPO-2577
|
||||
// test DELETE for a locked node
|
||||
// try
|
||||
// {
|
||||
// commentsProxy.removeNodeComment(nodeRef1.getId(), createdComment.getId());
|
||||
//
|
||||
// fail("");
|
||||
// }
|
||||
// catch (PublicApiException e)
|
||||
// {
|
||||
// assertEquals(HttpStatus.SC_CONFLICT, e.getHttpResponse().getStatusCode());
|
||||
// }
|
||||
|
||||
// change to lock owner
|
||||
publicApiClient.setRequestContext(new RequestContext(network1.getId(), person13.getId()));
|
||||
@@ -886,7 +931,7 @@ public class TestNodeComments extends EnterpriseTestApi
|
||||
repoService.unlockNode(nodeRef1);
|
||||
return null;
|
||||
}
|
||||
}, person11.getId(), network1.getId());
|
||||
}, person13.getId(), network1.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user