RM-4576 (Updated the expected status code for the case when someone tries to modify the meta data of a closed record)

This commit is contained in:
Tuna Aksoy
2017-01-25 13:42:03 +00:00
parent 9b9110e745
commit 7f72a6da22

View File

@@ -29,8 +29,8 @@ package org.alfresco.rest.rm.community.fileplancomponents;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.IMAGE_FILE; import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.IMAGE_FILE;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createElectronicRecordModel; import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createElectronicRecordModel;
import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createNonElectronicRecordModel; import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.createNonElectronicRecordModel;
import static org.springframework.http.HttpStatus.BAD_REQUEST;
import static org.springframework.http.HttpStatus.CREATED; import static org.springframework.http.HttpStatus.CREATED;
import static org.springframework.http.HttpStatus.FORBIDDEN;
import static org.springframework.http.HttpStatus.OK; import static org.springframework.http.HttpStatus.OK;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
@@ -236,7 +236,7 @@ public class UpdateRecordsTests extends BaseRMRestTest
// attempt to update record // attempt to update record
filePlanComponentsAPI.updateFilePlanComponent(updateRecord, record.getId()); filePlanComponentsAPI.updateFilePlanComponent(updateRecord, record.getId());
assertStatusCode(BAD_REQUEST); assertStatusCode(FORBIDDEN);
// verify the original record metatada has been retained // verify the original record metatada has been retained
FilePlanComponent updatedRecord = filePlanComponentsAPI.getFilePlanComponent(record.getId()); FilePlanComponent updatedRecord = filePlanComponentsAPI.getFilePlanComponent(record.getId());