Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1)

128122 jvonka: v1 REST API:  minor bug fix(es) to update http error code mappings (to 4xx rather than 500) + sanity api tests
   REPO-475, REPO-512, REPO-516, REPO-473


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129125 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Martin Muller
2016-08-05 10:10:41 +00:00
parent 24d305c132
commit c13683eea1
5 changed files with 63 additions and 8 deletions

View File

@@ -1503,6 +1503,16 @@ public class NodeAssociationsApiTest extends AbstractBaseApiTest
assertEquals(o2Id, nodes.get(0).getId());
// TODO test model with mandatory aspect
// -ve test - minor: error code if creating a cyclic child assoc (REPO-475)
String myNodeId = getMyNodeId(user1);
n = new Node();
n.setName("my-folder-1");
n.setNodeType(TYPE_CM_FOLDER);
AssocChild assocChild = new AssocChild(myNodeId, "cm:contains");
n.setSecondaryChildren(Collections.singletonList(assocChild));
post(getNodeChildrenUrl(myNodeId), user1, RestApiUtil.toJsonAsStringNonNull(n), 400);
}
finally
{