mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4023: better check for PUT request
This commit is contained in:
@@ -246,7 +246,7 @@ public class UnfiledRecordsFolderTests extends BaseRestTest
|
|||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@Test(description = "Child unfiled records folder can be created in a parent unfiled records folder")
|
@Test(description = "Unfiled record folder")
|
||||||
public void editUnfiledRecordsFolder() throws Exception
|
public void editUnfiledRecordsFolder() throws Exception
|
||||||
{
|
{
|
||||||
RestWrapper restWrapper = filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
RestWrapper restWrapper = filePlanComponentAPI.usingRestWrapper().authenticateUser(dataUser.getAdminUser());
|
||||||
@@ -267,12 +267,13 @@ public class UnfiledRecordsFolderTests extends BaseRestTest
|
|||||||
.getJson();
|
.getJson();
|
||||||
|
|
||||||
// Update the unfiled records folder
|
// Update the unfiled records folder
|
||||||
FilePlanComponent renamedFolder = filePlanComponentAPI.updateFilePlanComponent(updateFolderProperties,
|
filePlanComponentAPI.updateFilePlanComponent(updateFolderProperties, folderToModify.getId());
|
||||||
folderToModify.getId());
|
|
||||||
|
|
||||||
// Verify the status code
|
// Verify the status code
|
||||||
restWrapper.assertStatusCodeIs(OK);
|
restWrapper.assertStatusCodeIs(OK);
|
||||||
|
|
||||||
|
// this is to ensure the change was actually applied, rather than simply trusting the object returned by PUT
|
||||||
|
FilePlanComponent renamedFolder = filePlanComponentAPI.getFilePlanComponent(folderToModify.getId());
|
||||||
|
|
||||||
// Verify the returned file plan component
|
// Verify the returned file plan component
|
||||||
assertEquals(modified + folderToModify.getName(), renamedFolder.getName());
|
assertEquals(modified + folderToModify.getName(), renamedFolder.getName());
|
||||||
assertEquals(modified + folderToModify.getProperties().getTitle(), renamedFolder.getProperties().getTitle());
|
assertEquals(modified + folderToModify.getProperties().getTitle(), renamedFolder.getProperties().getTitle());
|
||||||
|
Reference in New Issue
Block a user