summaryrefslogtreecommitdiff
path: root/tests/Language/GraphQL/AST/EncoderSpec.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Language/GraphQL/AST/EncoderSpec.hs')
-rw-r--r--tests/Language/GraphQL/AST/EncoderSpec.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/Language/GraphQL/AST/EncoderSpec.hs b/tests/Language/GraphQL/AST/EncoderSpec.hs
index b916658..e98d5ef 100644
--- a/tests/Language/GraphQL/AST/EncoderSpec.hs
+++ b/tests/Language/GraphQL/AST/EncoderSpec.hs
@@ -14,12 +14,9 @@ import qualified Language.GraphQL.AST.DirectiveLocation as DirectiveLocation
spec :: Spec
spec = do
describe "value" $ do
- context "null value" $ do
- let testNull formatter = value formatter Full.Null `shouldBe` "null"
- it "minified" $ testNull minified
- it "pretty" $ testNull pretty
-
context "minified" $ do
+ it "encodes null" $
+ value minified Full.Null `shouldBe` "null"
it "escapes \\" $
value minified (Full.String "\\") `shouldBe` "\"\\\\\""
it "escapes double quotes" $
@@ -45,6 +42,9 @@ spec = do
it "~" $ value minified (Full.String "\x007E") `shouldBe` "\"~\""
context "pretty" $ do
+ it "encodes null" $
+ value pretty Full.Null `shouldBe` "null"
+
it "uses strings for short string values" $
value pretty (Full.String "Short text") `shouldBe` "\"Short text\""
it "uses block strings for text with new lines, with newline symbol" $