REPO-1059: REST API: Invalid orderBy field direction is ignored (hence defaults to ascending rather than returning an error)

- follow-on to r13055 to fix test fallout

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130573 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2016-09-12 13:14:00 +00:00
parent 7e85c8ac0f
commit 44f9d72d42

View File

@@ -1062,16 +1062,19 @@ public class ProcessWorkflowApiTest extends EnterpriseWorkflowTestApi
{ {
assertEquals(HttpStatus.BAD_REQUEST.value(), e.getHttpResponse().getStatusCode()); assertEquals(HttpStatus.BAD_REQUEST.value(), e.getHttpResponse().getStatusCode());
} }
// sort on non existing sort order (default ASC is taken) // sort on non existing sort order
paramMap.put("orderBy", "businessKey ASC2"); try
processList = processesClient.getProcesses(paramMap); {
assertNotNull(processList);
assertEquals(3, processList.getList().size()); paramMap.put("orderBy", "businessKey ASC2");
processList = processesClient.getProcesses(paramMap);
assertEquals(process3.getId(), processList.getList().get(0).getId()); fail("forbidden expected");
assertEquals(process1.getId(), processList.getList().get(1).getId()); }
assertEquals(process2.getId(), processList.getList().get(2).getId()); catch (PublicApiException e)
{
assertEquals(HttpStatus.BAD_REQUEST.value(), e.getHttpResponse().getStatusCode());
}
} }
finally finally
{ {