diff options
| author | Danny Navarro <j@dannynavarro.net> | 2015-09-22 13:53:37 +0200 |
|---|---|---|
| committer | Danny Navarro <j@dannynavarro.net> | 2015-09-22 14:02:49 +0200 |
| commit | 06b3302862e0c427439136241fb6299f215cec52 (patch) | |
| tree | 338b9ecc208b4b25dfeaab61d2d326e6020aa3a8 /tests/golden.hs | |
| parent | 45083642667fce8a1f6d1491f3487243416e8cc0 (diff) | |
| download | graphql-06b3302862e0c427439136241fb6299f215cec52.tar.gz | |
Add kitchen sink parse/encode unit test
This also includes the fixes to make it work. Golden tests have been
removed.
Diffstat (limited to 'tests/golden.hs')
| -rw-r--r-- | tests/golden.hs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/tests/golden.hs b/tests/golden.hs deleted file mode 100644 index 98413eb..0000000 --- a/tests/golden.hs +++ /dev/null @@ -1,25 +0,0 @@ -{-# LANGUAGE CPP #-} -{-# LANGUAGE OverloadedStrings #-} -module Main where - -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>), (<*>), pure) -#endif -import Control.Monad ((>=>)) -import Data.Attoparsec.Text (parseOnly) -import Data.ByteString.Lazy.Char8 as B8 -import qualified Data.Text.IO as TIO -import Test.Tasty (defaultMain) -import Test.Tasty.Golden (goldenVsString) - -import Paths_graphql (getDataFileName) -import Data.GraphQL.Parser (document) - -main :: IO () -main = defaultMain - =<< goldenVsString "kitchen-sink.graphql" - <$> getDataFileName "tests/data/kitchen-sink.graphql.graphql.golden" - <*> (parse <$> getDataFileName "tests/data/kitchen-sink.graphql") - where - parse = fmap (parseOnly document) . TIO.readFile - >=> pure . either B8.pack (flip B8.snoc '\n' . B8.pack . show) |
