mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
126398 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 120807 jvonka: FileFolder API - create/update node will return 400 for unknown property or aspect (not in dictionary models) - we no longer ignore invalid property and now also return correct error code for invalid aspect - update NodeApiTest and A/C of JIRAs ( RA-635, RA-636, RA-637, RA-638 ) - note: in the future, we could consider option (eg. via query param) to allow residual props on create or update (or at least ability to nullify) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126743 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -196,7 +196,7 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
repoService.addToDocumentLibrary(userOneN1Site, folder2, ContentModel.TYPE_FOLDER);
|
||||
|
||||
String content1 = "content" + System.currentTimeMillis() + "_1";
|
||||
NodeRef contentNodeRef = repoService.addToDocumentLibrary(userOneN1Site, content1, ContentModel.TYPE_CONTENT);
|
||||
repoService.addToDocumentLibrary(userOneN1Site, content1, ContentModel.TYPE_CONTENT);
|
||||
|
||||
String content2 = "content" + System.currentTimeMillis() + "_2";
|
||||
repoService.addToDocumentLibrary(userOneN1Site, content2, ContentModel.TYPE_CONTENT);
|
||||
@@ -1256,14 +1256,19 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
f1.setNodeType("app:glossary");
|
||||
f1.expected(folderResp);
|
||||
|
||||
// -ve test - ignore unknown property
|
||||
// -ve test - fail on unknown property
|
||||
props = new HashMap<>();
|
||||
props.put("cm:xyz","my unknown property");
|
||||
dUpdate = new Document();
|
||||
dUpdate.setProperties(props);
|
||||
response = put("nodes", user1, dId, toJsonAsStringNonNull(dUpdate), null, 200);
|
||||
documentResp = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||
d1.expected(documentResp);
|
||||
put("nodes", user1, dId, toJsonAsStringNonNull(dUpdate), null, 400);
|
||||
|
||||
// -ve test - fail on unknown aspect
|
||||
List<String> aspects = new ArrayList<>(d1.getAspectNames());
|
||||
aspects.add("cm:unknownAspect");
|
||||
dUpdate = new Document();
|
||||
dUpdate.setAspectNames(aspects);
|
||||
put("nodes", user1, dId, toJsonAsStringNonNull(dUpdate), null, 400);
|
||||
|
||||
// -ve test - duplicate name
|
||||
dUpdate = new Document();
|
||||
|
Reference in New Issue
Block a user