From 8daac2d403aa4fef8118507e7d9f8f316f7e9627 Mon Sep 17 00:00:00 2001 From: Ross Gale Date: Wed, 19 Jun 2019 10:57:08 +0100 Subject: [PATCH] Revert "RM-6865 code review changes" This reverts commit b4bc9195 --- .../files/DeclareAndFileDocumentAsRecordTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareAndFileDocumentAsRecordTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareAndFileDocumentAsRecordTests.java index 72eafb3c97..244132d031 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareAndFileDocumentAsRecordTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/files/DeclareAndFileDocumentAsRecordTests.java @@ -44,6 +44,7 @@ import static org.springframework.http.HttpStatus.CREATED; import static org.springframework.http.HttpStatus.FORBIDDEN; import static org.springframework.http.HttpStatus.NOT_FOUND; import static org.springframework.http.HttpStatus.UNPROCESSABLE_ENTITY; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; @@ -51,6 +52,7 @@ import java.util.List; import org.alfresco.dataprep.CMISUtil; import org.alfresco.rest.rm.community.base.BaseRMRestTest; +import org.alfresco.rest.rm.community.model.record.Record; import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory; import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild; @@ -278,13 +280,13 @@ public class DeclareAndFileDocumentAsRecordTests extends BaseRMRestTest public void declareAndFileToValidLocationUsingFilesAPI() throws Exception { STEP("Declare document as record with a location parameter value"); - getRestAPIFactory().getFilesAPI(userFillingPermission) + Record record = getRestAPIFactory().getFilesAPI(userFillingPermission) .usingParams(String.format("%s=%s", PARENT_ID_PARAM, recordFolder.getId())) .declareAsRecord(testFile.getNodeRefWithoutVersion()); assertStatusCode(CREATED); STEP("Verify the declared record is placed in the record folder"); - assertTrue(isMatchingRecordInRecordFolder(testFile, recordFolder), "Record should be filed to record folder"); + assertEquals(record.getParentId(), recordFolder.getId(), "Record should be filed to record folder"); STEP("Verify the document in collaboration site is now a record"); assertTrue(hasRecordAspect(testFile), "File should have record aspect");