Merged 5.2.N (5.2.1) to HEAD (5.2)

130835 jvonka: REPO-1058: REST API - minor fix for "fields" param (fka "properties") to handle field names with spaces


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@132187 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-11-03 13:27:07 +00:00
parent 4abc64a3e2
commit 99ff22c738
3 changed files with 42 additions and 25 deletions

View File

@@ -520,24 +520,19 @@ public class QueriesPeopleApiTest extends AbstractSingleNetworkSiteTest
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
// public void testFieldsWithSpace() throws Exception
// {
// fields = PARAM_FIRSTNAME+", "+PARAM_LASTNAME;
// term = LAST_A;
// expectedPeople = new String[]
// {
// "Person ["+ "lastName=LastA, ]", // USER5
// "Person ["+"firstName=FirstA, lastName=LastA, ]", // USER1
// "Person ["+"firstName=FirstB, lastName=LastA, ]", // USER3
// // But is the following:
//// "Person ["+ "]",
//// "Person ["+"firstName=FirstA, ]",
//// "Person ["+"firstName=FirstB, ]",
// };
//
// checkApiCall(term, orderBy, fields, paging, expectedStatus, expectedPeople);
// }
@Test
public void testFieldsWithSpace() throws Exception
{
fields = PARAM_FIRSTNAME+", "+PARAM_LASTNAME;
term = LAST_A;
expectedPeople = new String[]
{
"Person ["+ "lastName=LastA, ]", // USER5
"Person ["+"firstName=FirstA, lastName=LastA, ]", // USER1
"Person ["+"firstName=FirstB, lastName=LastA, ]" // USER3
};
checkApiCall(term, orderBy, fields, paging, expectedStatus, expectedPeople);
}
}