mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-22 10:31:46 +03:00
b9dc82d22c
This test could have detected regression on header parsing.
2 lines
2.6 KiB
JSON
2 lines
2.6 KiB
JSON
{"entries":[{"request":{"method":"POST","url":"http://localhost:8000/graphql","body":{"type":"graphql","value":"{\n allFilms {\n films {\n title\n director\n releaseDate\n }\n }\n}\n"}},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.data.allFilms.films"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":6}},{"query":{"type":"jsonpath","expr":"$.data.allFilms.films[0].title"},"predicate":{"type":"equal","value":"A New Hope"}},{"query":{"type":"jsonpath","expr":"$.data.allFilms.films[0].director"},"predicate":{"type":"equal","value":"George Lucas"}},{"query":{"type":"jsonpath","expr":"$.data.allFilms.films[0].releaseDate"},"predicate":{"type":"equal","value":"1977-05-25"}},{"query":{"type":"jsonpath","expr":"$.data.allFilms.films[0].openingCrawl"},"predicate":{"not":true,"type":"exist"}},{"query":{"type":"jsonpath","expr":"$.data.allFilms.films[1].title"},"predicate":{"type":"equal","value":"The Empire Strikes Back"}},{"query":{"type":"jsonpath","expr":"$.data.allFilms.films[2].title"},"predicate":{"type":"equal","value":"Return of the Jedi"}}]}},{"request":{"method":"POST","url":"http://localhost:8000/graphql","headers":[{"name":"Content-Type","value":"application/json"}],"body":{"type":"json","value":{"query":"{\n allFilms {\n films {\n title\n director\n releaseDate\n }\n }\n}"}}},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.data.allFilms.films"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":6}}]}},{"request":{"method":"POST","url":"http://localhost:8000/graphql","body":{"type":"graphql","value":"query Query {\n allFilms {\n films {\n title\n director\n releaseDate\n }\n }\n}\n"}},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.data.allFilms.films"},"filters":[{"type":"count"}],"predicate":{"type":"equal","value":6}}]}},{"request":{"method":"POST","url":"http://localhost:8000/graphql","body":{"type":"graphql","value":"query Person($id: ID!) {\n person(id: $id) {\n name\n }\n}\n\nvariables {\n \"id\": \"cGVvcGxlOjQ=\"\n}\n"}},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.data.person.name"},"predicate":{"type":"equal","value":"Darth Vader"}}]}},{"request":{"method":"POST","url":"http://localhost:8000/graphql","body":{"type":"graphql","value":"query Person($id: ID!) {\n person(id: $id) {\n name\n }\n}\n\nvariables {\n \"id\": \"{{id}}\"\n}\n"}},"response":{"status":200,"asserts":[{"query":{"type":"jsonpath","expr":"$.data.person.name"},"predicate":{"type":"equal","value":"Darth Vader"}}]}}]}
|