mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.0 (5.2.0) to HEAD (5.2)
133168 jvonka: REPO-1635: V1 REST API - minor fix for error code (update node/people details) - invalid data type conversion should return 400 instead of 500 - REPO-1635, REPO-1641 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@133398 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -3058,6 +3058,22 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
|
||||
fUpdate.setProperties(props);
|
||||
put(URL_NODES, f2Id, toJsonAsStringNonNull(fUpdate), null, 400);
|
||||
|
||||
// -ve test - minor: error code if trying to update property with invalid format (REPO-1635)
|
||||
props = new HashMap<>();
|
||||
props.put("exif:dateTimeOriginal", "25-11-2016");
|
||||
fUpdate = new Folder();
|
||||
fUpdate.setProperties(props);
|
||||
put(URL_NODES, f2Id, toJsonAsStringNonNull(fUpdate), null, 400);
|
||||
|
||||
// +ve test - try again with valid formats (REPO-473, REPO-1635)
|
||||
props = new HashMap<>();
|
||||
props.put("exif:pixelYDimension", "123");
|
||||
props.put("exif:dateTimeOriginal", "2016-11-21T16:26:19.037+0000");
|
||||
fUpdate = new Folder();
|
||||
fUpdate.setProperties(props);
|
||||
put(URL_NODES, f2Id, toJsonAsStringNonNull(fUpdate), null, 200);
|
||||
|
||||
|
||||
// -ve test - non-admin cannot modify root (Company Home) folder
|
||||
props = new HashMap<>();
|
||||
props.put("cm:description", "my folder description");
|
||||
|
Reference in New Issue
Block a user