diff options
| author | mo khan <mo.m.khan@shopify.com> | 2020-12-23 16:44:27 -0700 |
|---|---|---|
| committer | mo khan <mo.m.khan@shopify.com> | 2020-12-23 16:44:27 -0700 |
| commit | c9e2cb2accb9a1a484b0d709fe5eb5d537486e21 (patch) | |
| tree | 2ea4eac78b1f1e81977dd9affca6247e212f404b /test | |
| parent | ae339b9477eea323caaf67371c5abd92723633cd (diff) | |
test: start to test schema
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/server_test.rb | 2 | ||||
| -rw-r--r-- | test/unit/schema_test.rb | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/test/integration/server_test.rb b/test/integration/server_test.rb index 9e67241..754edff 100644 --- a/test/integration/server_test.rb +++ b/test/integration/server_test.rb @@ -14,7 +14,7 @@ class ServerTest < Minitest::Test refute_empty last_response.body json = JSON.parse(last_response.body) - assert_equal 'mo', json['data']['me'] + assert_equal 'mo', json['data']['me']['name'] end def test_get_graphql_with_post_body diff --git a/test/unit/schema_test.rb b/test/unit/schema_test.rb new file mode 100644 index 0000000..ed6954e --- /dev/null +++ b/test/unit/schema_test.rb @@ -0,0 +1,9 @@ + +class SchemaTest < Minitest::Test + def test_me + result = Schema.execute("{me}") + + assert result + puts result.inspect + end +end |
