mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -187,7 +187,15 @@ public class CommonRMTestUtils implements RecordsManagementModel
|
|||||||
@Override
|
@Override
|
||||||
public Void doWork() throws Exception
|
public Void doWork() throws Exception
|
||||||
{
|
{
|
||||||
actionService.executeRecordsManagementAction(recordFolder, "closeRecordFolder");
|
modelSecurityService.setEnabled(false);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
actionService.executeRecordsManagementAction(recordFolder, "closeRecordFolder");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
modelSecurityService.setEnabled(true);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}, AuthenticationUtil.getAdminUserName());
|
}, AuthenticationUtil.getAdminUserName());
|
||||||
|
@@ -339,7 +339,10 @@ public class DispositionRestApiTest extends BaseRMWebScriptTestCase implements R
|
|||||||
// Test 404 for disposition lifecycle request on incorrect node
|
// Test 404 for disposition lifecycle request on incorrect node
|
||||||
String categoryUrl = recordCategory.toString().replace("://", "/");
|
String categoryUrl = recordCategory.toString().replace("://", "/");
|
||||||
String requestUrl = MessageFormat.format(GET_LIFECYCLE_URL_FORMAT, categoryUrl);
|
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");
|
NodeRef newRecordFolder = rmService.createRecordFolder(recordCategory, "recordFolder");
|
||||||
|
|
||||||
@@ -428,7 +431,7 @@ public class DispositionRestApiTest extends BaseRMWebScriptTestCase implements R
|
|||||||
JSONObject periodProperties = data.getJSONObject("periodProperties");
|
JSONObject periodProperties = data.getJSONObject("periodProperties");
|
||||||
assertEquals(SERVICE_URL_PREFIX + GET_LIST_URL + "/periodproperties", periodProperties.getString("url"));
|
assertEquals(SERVICE_URL_PREFIX + GET_LIST_URL + "/periodproperties", periodProperties.getString("url"));
|
||||||
items = periodProperties.getJSONArray("items");
|
items = periodProperties.getJSONArray("items");
|
||||||
assertEquals(4, items.length());
|
assertEquals(5, items.length());
|
||||||
assertTrue(items.length() > 0);
|
assertTrue(items.length() > 0);
|
||||||
item = items.getJSONObject(0);
|
item = items.getJSONObject(0);
|
||||||
assertTrue(item.length() == 2);
|
assertTrue(item.length() == 2);
|
||||||
|
Reference in New Issue
Block a user