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)
126440 jkaabimofrad: Merged FILE-FOLDER-API (5.2.0) to HEAD (5.2) 121926 jvonka: Nodes (File/Folder) API - prevent move via PUT (change of parentId) - will be replaced shortly by POST /nodes/{nodeId}/move (RA-806) RA-683 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@126786 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1066,6 +1066,10 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
* <p>PUT:</p>
|
||||
* {@literal <host>:<port>/alfresco/api/-default-/public/alfresco/versions/1/nodes/<nodeId>}
|
||||
*/
|
||||
|
||||
// TODO update these tests for RA-806 (ie. use "POST /nodes/{nodeId}/move" instead of "PUT /nodes/{nodeId}")
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void testMove() throws Exception
|
||||
{
|
||||
@@ -1165,6 +1169,7 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
put("nodes", user2, f1Id, toJsonAsStringNonNull(dUpdate), null, 403);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Tests copy (file or folder)
|
||||
* <p>PUT:</p>
|
||||
@@ -1772,6 +1777,20 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
fUpdate = new Folder();
|
||||
fUpdate.setNodeType("cm:folder");
|
||||
put("nodes", user1, fId, toJsonAsStringNonNull(fUpdate), null, 400);
|
||||
|
||||
// -ve test - try to move to a different parent using PUT (note: should use new POST /nodes/{nodeId}/move operation instead)
|
||||
|
||||
folderResp = createFolder(user1, myNodeId, "folder 2");
|
||||
String f2Id = folderResp.getId();
|
||||
|
||||
fUpdate = new Folder();
|
||||
fUpdate.setParentId(f2Id);
|
||||
put("nodes", user1, fId, toJsonAsStringNonNull(fUpdate), null, 400);
|
||||
|
||||
// ok - if parent does not change
|
||||
fUpdate = new Folder();
|
||||
fUpdate.setParentId(myNodeId);
|
||||
put("nodes", user1, fId, toJsonAsStringNonNull(fUpdate), null, 200);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1895,8 +1914,6 @@ public class NodeApiTest extends AbstractBaseApiTest
|
||||
assertNotNull(content, response.getResponse());
|
||||
}
|
||||
|
||||
// TODO add test to create multiple folders & empty files (within same parent folder)
|
||||
|
||||
/**
|
||||
* Tests download of file/content.
|
||||
* <p>GET:</p>
|
||||
|
Reference in New Issue
Block a user