mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-6865 adding test
This commit is contained in:
@@ -117,4 +117,35 @@ public class CreateRecordActionTest extends BaseRMTestCase
|
||||
},
|
||||
ADMIN_USER);
|
||||
}
|
||||
|
||||
public void testCreateRecordActionWithLocationWithSpaces()
|
||||
{
|
||||
doTestInTransaction(new Test<Void>()
|
||||
{
|
||||
public Void run()
|
||||
{
|
||||
assertFalse(recordService.isRecord(dmDocument1));
|
||||
|
||||
Action action = actionService.createAction(CreateRecordAction.NAME);
|
||||
action.setParameterValue(CreateRecordAction.PARAM_HIDE_RECORD, false);
|
||||
action.setParameterValue(CreateRecordAction.PARAM_FILE_PLAN, filePlan);
|
||||
action.setParameterValue(CreateRecordAction.PARAM_PATH, "rm Container/rm Folder");
|
||||
action.setParameterValue(CreateRecordAction.PARAM_ENCODED, true);
|
||||
actionService.executeAction(action, dmDocument1);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void test(Void result) throws Exception
|
||||
{
|
||||
assertTrue(recordService.isRecord(dmDocument1));
|
||||
assertTrue(recordService.isFiled(dmDocument1));
|
||||
|
||||
// is the record folder the primary parent of the filed record
|
||||
NodeRef parent = nodeService.getPrimaryParent(dmDocument1).getParentRef();
|
||||
assertEquals(rm_Folder, parent);
|
||||
}
|
||||
},
|
||||
ADMIN_USER);
|
||||
}
|
||||
}
|
||||
|
@@ -186,8 +186,10 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
|
||||
protected NodeRef folder;
|
||||
protected NodeRef filePlan;
|
||||
protected NodeRef rmContainer;
|
||||
protected NodeRef rm_Container;
|
||||
protected DispositionSchedule dispositionSchedule;
|
||||
protected NodeRef rmFolder;
|
||||
protected NodeRef rm_Folder;
|
||||
protected NodeRef unfiledContainer;
|
||||
protected String collabSiteId;
|
||||
protected NodeRef holdsContainer;
|
||||
@@ -586,12 +588,18 @@ public abstract class BaseRMTestCase extends RetryingTransactionHelperTestCase
|
||||
rmContainer = filePlanService.createRecordCategory(filePlan, "rmContainer");
|
||||
assertNotNull("Could not create rm container", rmContainer);
|
||||
|
||||
rm_Container = filePlanService.createRecordCategory(filePlan, "rm Container");
|
||||
assertNotNull("Could not create rm container", rm_Container);
|
||||
|
||||
// Create disposition schedule
|
||||
dispositionSchedule = utils.createBasicDispositionSchedule(rmContainer);
|
||||
|
||||
// Create RM folder
|
||||
rmFolder = recordFolderService.createRecordFolder(rmContainer, "rmFolder");
|
||||
assertNotNull("Could not create rm folder", rmFolder);
|
||||
|
||||
rm_Folder = recordFolderService.createRecordFolder(rm_Container, "rm Folder");
|
||||
assertNotNull("Could not create rm folder", rm_Folder);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user