mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
REPO-484: [REST API] 400 error for unsupported NOT operator in the 'where' predicate.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130610 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -519,6 +519,12 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
|
||||
// -ve test - list folder children with relative path to unknown node should return 400
|
||||
params = Collections.singletonMap(Nodes.PARAM_RELATIVE_PATH, "/unknown");
|
||||
getAll(getNodeChildrenUrl(content1_Id), paging, params, 400);
|
||||
|
||||
// filtering, via where clause - negated comparison
|
||||
params = new HashMap<>();
|
||||
params.put("where", "(NOT "+Nodes.PARAM_ISFILE+"=true)");
|
||||
getAll(childrenUrl, paging, params, 400);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -485,7 +485,7 @@ public class WhereTests implements RecognizedParamsExtractor
|
||||
assertEquals(WhereClauseParser.PROPERTYVALUE, tree.getChild(1).getType());
|
||||
QueryHelper.walk(theQuery, new WalkerCallbackAdapter(){
|
||||
@Override
|
||||
public void comparison(int comparisonType, String propertyName, String propertyValue) {
|
||||
public void comparison(int comparisonType, String propertyName, String propertyValue, boolean negated) {
|
||||
assertTrue("Property name should be "+propName,propName.equals(propertyName));
|
||||
assertTrue(comparisonOperator == comparisonType);
|
||||
assertTrue("Property value should be "+propVal,propVal.equals(propertyValue));
|
||||
|
Reference in New Issue
Block a user