This is an automated email from the ASF dual-hosted git repository.

bdelacretaz pushed a commit to branch feature/SLING-9655
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-graphql-core.git


The following commit(s) were added to refs/heads/feature/SLING-9655 by this 
push:
     new e0949d3  SLING-9655 - check query results here as well
e0949d3 is described below

commit e0949d328958d83ada0935533287eb6c0a0e23bd
Author: Bertrand Delacretaz <[email protected]>
AuthorDate: Mon Aug 31 11:02:00 2020 +0200

    SLING-9655 - check query results here as well
---
 .../java/org/apache/sling/graphql/core/it/GraphQLServletIT.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java 
b/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java
index e0eb548..fc6356c 100644
--- a/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java
+++ b/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java
@@ -129,7 +129,10 @@ public class GraphQLServletIT extends 
GraphQLCoreTestSupport {
 
         response = executeRequest("GET", "/graphql/two.gql/persisted/" + 
queryHash, null, "application/json", new StringReader(""),200);
         assertEquals("max-age=60", response.getHeader("Cache-Control"));
-
+        final String json = response.getOutputAsString();
+        assertThat(json, hasJsonPath("$.data.currentResource.resourceType", 
equalTo("graphql/test/two")));
+        assertThat(json, hasJsonPath("$.data.currentResource.name", 
equalTo("two")));
+        assertThat(json, hasNoJsonPath("$.data.currentResource.path"));
     }
 
     @Test
@@ -148,8 +151,6 @@ public class GraphQLServletIT extends 
GraphQLCoreTestSupport {
         context.setCredentialsProvider(credsProvider);
         context.setAuthCache(authCache);
 
-
-
         Map<String, Object> queryMap = new HashMap<>();
         queryMap.put("query", "{ currentResource { resourceType name } }");
         queryMap.put("variables", Collections.emptyMap());

Reply via email to