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

130186 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1)
      129839 gjames: Adding a better json example to the integration test.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130337 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 22:05:40 +00:00
parent 3db8c1b295
commit a4d3b2e60c

View File

@@ -56,6 +56,7 @@ public class BasicSearchApiIntegrationTest extends AbstractSingleNetworkSiteTest
private static final String SEARCH_API_NAME = "search"; private static final String SEARCH_API_NAME = "search";
private static final String json = "{ \"query\": {\"query\": \"cm:name:king\",\"userQuery\": \"great\",\"language\": \"afts\"}}"; private static final String json = "{ \"query\": {\"query\": \"cm:name:king\",\"userQuery\": \"great\",\"language\": \"afts\"}}";
private static final String bad_json = "{ \"query\": {\"qu\": \"cm:some nonsense \",\"userQuery\": \"great\",\"language\": \"afts\"}}"; private static final String bad_json = "{ \"query\": {\"qu\": \"cm:some nonsense \",\"userQuery\": \"great\",\"language\": \"afts\"}}";
/** /**
* Tests basic api for search * Tests basic api for search
*/ */
@@ -83,6 +84,9 @@ public class BasicSearchApiIntegrationTest extends AbstractSingleNetworkSiteTest
nodes = RestApiUtil.parseRestApiEntries(response.getJsonResponse(), Node.class); nodes = RestApiUtil.parseRestApiEntries(response.getJsonResponse(), Node.class);
assertEquals(1, nodes.size()); assertEquals(1, nodes.size());
//Just happy if it doesn't error
response = post(URL_SEARCH, SerializerTestHelper.JSON, null, null, SEARCH_API_NAME, 200);
} }
finally finally
{ {