mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Feature/acs 1834 test dau for deleted nodes (#686)
* Deleted Nodes DAU Test * Deleted Nodes DAU Test Moved * DAU Test Modification * Copyright * Unused import
This commit is contained in:
committed by
GitHub
parent
84824edffa
commit
2af2e7b868
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -704,6 +704,34 @@ public class DeletedNodesTest extends AbstractSingleNetworkSiteTest
|
||||
assertNull("We don't show the parent id for a deleted node",aNode.getParentId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRequestArchivedContentDirectUrl() throws Exception
|
||||
{
|
||||
setRequestContext(user1);
|
||||
|
||||
String myNodeId = getMyNodeId();
|
||||
|
||||
String fileName = "TestDocumentToArchive.txt";
|
||||
Document testDocumentToArchive = new Document();
|
||||
testDocumentToArchive.setName(fileName);
|
||||
testDocumentToArchive.setNodeType(TYPE_CM_CONTENT);
|
||||
|
||||
// create *empty* text file
|
||||
HttpResponse response = post(getNodeChildrenUrl(myNodeId), toJsonAsStringNonNull(testDocumentToArchive), 201);
|
||||
Document document = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||
|
||||
final String contentNodeId = document.getId();
|
||||
deleteNode(contentNodeId);
|
||||
|
||||
// Check the upload response
|
||||
assertEquals(fileName, document.getName());
|
||||
ContentInfo contentInfo = document.getContent();
|
||||
assertNotNull(contentInfo);
|
||||
assertEquals(MimetypeMap.MIMETYPE_TEXT_PLAIN, contentInfo.getMimeType());
|
||||
|
||||
HttpResponse dauResponse = post(getRequestArchivedContentDirectUrl(contentNodeId), null, null, null, null, 501);
|
||||
}
|
||||
|
||||
private String getDeletedNodeRenditionsUrl(String nodeId)
|
||||
{
|
||||
return URL_DELETED_NODES + "/" + nodeId + "/" + URL_RENDITIONS;
|
||||
|
Reference in New Issue
Block a user