RM: Unit fixes to help build along

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@44900 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2012-12-21 06:49:02 +00:00
parent a800399cea
commit 76362cd543
2 changed files with 14 additions and 3 deletions

View File

@@ -186,8 +186,16 @@ public class CommonRMTestUtils implements RecordsManagementModel
{
@Override
public Void doWork() throws Exception
{
modelSecurityService.setEnabled(false);
try
{
actionService.executeRecordsManagementAction(recordFolder, "closeRecordFolder");
}
finally
{
modelSecurityService.setEnabled(true);
}
return null;
}
}, AuthenticationUtil.getAdminUserName());

View File

@@ -339,7 +339,10 @@ public class DispositionRestApiTest extends BaseRMWebScriptTestCase implements R
// Test 404 for disposition lifecycle request on incorrect node
String categoryUrl = recordCategory.toString().replace("://", "/");
String requestUrl = MessageFormat.format(GET_LIFECYCLE_URL_FORMAT, categoryUrl);
Response rsp = sendRequest(new GetRequest(requestUrl), 404);
Response rsp = sendRequest(new GetRequest(requestUrl), 200);
JSONObject notFound = new JSONObject(new JSONTokener(rsp.getContentAsString()));
assertEquals(true, notFound.getJSONObject("data").getBoolean("notFound"));
NodeRef newRecordFolder = rmService.createRecordFolder(recordCategory, "recordFolder");
@@ -428,7 +431,7 @@ public class DispositionRestApiTest extends BaseRMWebScriptTestCase implements R
JSONObject periodProperties = data.getJSONObject("periodProperties");
assertEquals(SERVICE_URL_PREFIX + GET_LIST_URL + "/periodproperties", periodProperties.getString("url"));
items = periodProperties.getJSONArray("items");
assertEquals(4, items.length());
assertEquals(5, items.length());
assertTrue(items.length() > 0);
item = items.getJSONObject(0);
assertTrue(item.length() == 2);