diff options
| author | Eugen Wissner <belka@caraus.de> | 2022-12-27 10:37:34 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2022-12-27 10:38:08 +0100 |
| commit | a96d4e6ef3b1020d239f0061af5861aadeb278fc (patch) | |
| tree | ae822d7ca7f3eb03a42ef23d000d9ba7da6d0913 /tests/Language/GraphQL/AST/EncoderSpec.hs | |
| parent | 3ce6e7da461030d7d6f4b356096492c072ce16e2 (diff) | |
| download | graphql-a96d4e6ef3b1020d239f0061af5861aadeb278fc.tar.gz | |
Add Semigroup and Monoid instances for Description
Diffstat (limited to 'tests/Language/GraphQL/AST/EncoderSpec.hs')
| -rw-r--r-- | tests/Language/GraphQL/AST/EncoderSpec.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/Language/GraphQL/AST/EncoderSpec.hs b/tests/Language/GraphQL/AST/EncoderSpec.hs index c654c0b..6b424d5 100644 --- a/tests/Language/GraphQL/AST/EncoderSpec.hs +++ b/tests/Language/GraphQL/AST/EncoderSpec.hs @@ -180,7 +180,7 @@ spec = do let actual = operationType pretty Full.Mutation in actual `shouldBe` "mutation" - describe "typeSystemDefinition" $ + describe "typeSystemDefinition" $ do it "produces a schema with an indented operation type definition" $ let queryType = Full.OperationTypeDefinition Full.Query "QueryRootType" mutationType = Full.OperationTypeDefinition Full.Mutation "MutationType" @@ -194,3 +194,10 @@ spec = do |] '\n' actual = typeSystemDefinition pretty definition' in actual `shouldBe` expected + + it "encodes a scalar type definition" $ + let uuidType = Full.ScalarTypeDefinition mempty "UUID" mempty + definition' = Full.TypeDefinition uuidType + expected = "scalar UUID" + actual = typeSystemDefinition pretty definition' + in actual `shouldBe` expected |
