mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
127218 arebegea: Merged 5.0.N (5.0.4) to 5.1.N (5.1.2) 127187 cturlica: MNT-15630: CLONE - people rest api does not accept the skipCount param - merged initial solution with some changes required for 5.0.N, because the people web script was split in people.get.js and people-enterprise.get.js git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@127253 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -245,6 +245,27 @@ public class PersonServiceTest extends BaseWebScriptTest
|
||||
response = sendRequest(new GetRequest(URL_PEOPLE + "/" + userName), 200);
|
||||
}
|
||||
|
||||
public void testGetPeopleSkipCount() throws Exception
|
||||
{
|
||||
// Test case for MNT-15357 skipCount
|
||||
int skipCount = 1;
|
||||
|
||||
// Ensure that the REST call with no filter will always be routed to a DB canned query rather than a FTS
|
||||
// (see ALF-18876 for details)
|
||||
String filter = "*%20[hint:useCQ]";
|
||||
|
||||
Response response = sendRequest(new GetRequest(URL_PEOPLE + "?filter=" + filter), 200);
|
||||
JSONObject res = new JSONObject(response.getContentAsString());
|
||||
|
||||
int peopleFound = res.getJSONArray("people").length();
|
||||
assertTrue("No people found", peopleFound > 0);
|
||||
|
||||
response = sendRequest(new GetRequest(URL_PEOPLE + "?filter=" + filter + "&skipCount=" + skipCount), 200);
|
||||
|
||||
res = new JSONObject(response.getContentAsString());
|
||||
assertTrue("skipCount ignored", res.getJSONArray("people").length() < peopleFound);
|
||||
}
|
||||
|
||||
public void testUpdatePerson() throws Exception
|
||||
{
|
||||
// Create a new person
|
||||
|
Reference in New Issue
Block a user