mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
130451 jkaabimofrad: SHA-1598: Minor tweaks of parsing of the property parameter based on GavinC review. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130936 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -332,7 +332,7 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
wfDefinition = workflowService.getDefinitionByName(getReviewPooledWorkflowDefinitionName());
|
||||
params.put(WorkflowModel.ASSOC_GROUP_ASSIGNEE, groupManager.get(GROUP));
|
||||
params.put(WorkflowModel.ASSOC_PACKAGE, workflowService.createPackage(null));
|
||||
params.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION, "descTest2");
|
||||
params.put(WorkflowModel.PROP_WORKFLOW_DESCRIPTION, "descTest2/withSlash");
|
||||
|
||||
wfPath = workflowService.startWorkflow(wfDefinition.getId(), params);
|
||||
workflowId = wfPath.getInstance().getId();
|
||||
@@ -356,13 +356,13 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
assertEquals("descTest1", properties.getString("bpm_description"));
|
||||
|
||||
//Check USER2's tasks With filtering where property bpm:description should match "descTest2"
|
||||
response = sendRequest(new GetRequest(MessageFormat.format(URL_USER_TASKS, USER2) + "&property=bpm:description/descTest2"), 200);
|
||||
response = sendRequest(new GetRequest(MessageFormat.format(URL_USER_TASKS, USER2) + "&property=bpm:description/descTest2/withSlash"), 200);
|
||||
results = getJsonArray(response, 1);
|
||||
result = results.getJSONObject(0);
|
||||
assertNotNull(result);
|
||||
properties = result.getJSONObject("properties");
|
||||
assertNotNull(properties);
|
||||
assertEquals("descTest2", properties.getString("bpm_description"));
|
||||
assertEquals("descTest2/withSlash", properties.getString("bpm_description"));
|
||||
|
||||
/*
|
||||
* -ve tests
|
||||
@@ -383,6 +383,14 @@ public abstract class AbstractWorkflowRestApiTest extends BaseWebScriptTest
|
||||
response = sendRequest(new GetRequest(MessageFormat.format(URL_USER_TASKS, USER2) + "&property=bpm:description/"), 200);
|
||||
getJsonArray(response, 2);
|
||||
|
||||
// Not well-formed parameter
|
||||
response = sendRequest(new GetRequest(MessageFormat.format(URL_USER_TASKS, USER2) + "&property=descTest1"), 200);
|
||||
getJsonArray(response, 2);
|
||||
|
||||
// Not well-formed parameter
|
||||
response = sendRequest(new GetRequest(MessageFormat.format(URL_USER_TASKS, USER2) + "&property=/descTest1"), 200);
|
||||
getJsonArray(response, 2);
|
||||
|
||||
// Check USER3's tasks without filtering. It should return 0 task as USER3 is not a member of the GROUP
|
||||
personManager.setUser(USER3);
|
||||
response = sendRequest(new GetRequest(MessageFormat.format(URL_USER_TASKS, USER3)), 200);
|
||||
|
Reference in New Issue
Block a user