From 2b312bf4ce12f4c6c920c4cc56d3eb1dab2b3ba0 Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Tue, 13 Sep 2016 16:58:20 +0000 Subject: [PATCH] REPO-1059: REST API: Invalid orderBy field is ignored - minor follow-on (comment in the specific test when this issue was found - in addition to the new generic tests) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130614 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../rest/api/tests/QueriesPeopleApiTest.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/test-java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java b/source/test-java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java index 3946711ec6..4c3d63db78 100644 --- a/source/test-java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java +++ b/source/test-java/org/alfresco/rest/api/tests/QueriesPeopleApiTest.java @@ -511,15 +511,15 @@ public class QueriesPeopleApiTest extends AbstractSingleNetworkSiteTest checkApiCall(term, orderBy, fields, paging, expectedStatus, expectedPeople); } -// // TODO Rubbish is taken to be "asc" so returns 200 rather than 400 - is this a framework bug? -// @Test -// public void testBadOrderByDirection() throws Exception -// { -// orderBy = "firstName rubbish, lastName asc"; -// expectedStatus = 400; -// -// checkApiCall(term, orderBy, fields, paging, expectedStatus, expectedPeople); -// } + @Test + public void testBadOrderByDirection() throws Exception + { + // note: also tested generically in RecognizedParamsExtractorTest + orderBy = "firstName rubbish, lastName asc"; + expectedStatus = 400; + + checkApiCall(term, orderBy, fields, paging, expectedStatus, expectedPeople); + } // // TODO Having a space in the list discards everything after the space - found in manual testing - is this a framework bug? // @Test