From 67bebf853ca5a248358ea1854124a46b70c677cd Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 1 Feb 2020 20:46:35 +0100 Subject: Replace MonadIO constraint with just Monad And make the tests use Identity instead of IO. --- tests/Test/StarWars/QuerySpec.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/Test/StarWars/QuerySpec.hs') diff --git a/tests/Test/StarWars/QuerySpec.hs b/tests/Test/StarWars/QuerySpec.hs index 4f92801..45fcf42 100644 --- a/tests/Test/StarWars/QuerySpec.hs +++ b/tests/Test/StarWars/QuerySpec.hs @@ -6,6 +6,7 @@ module Test.StarWars.QuerySpec import qualified Data.Aeson as Aeson import Data.Aeson ((.=)) +import Data.Functor.Identity (Identity(..)) import qualified Data.HashMap.Strict as HashMap import Data.Text (Text) import Language.GraphQL @@ -357,7 +358,8 @@ spec = describe "Star Wars Query Tests" $ do alderaan = "homePlanet" .= ("Alderaan" :: Text) testQuery :: Text -> Aeson.Value -> Expectation -testQuery q expected = graphql schema q >>= flip shouldBe expected +testQuery q expected = runIdentity (graphql schema q) `shouldBe` expected testQueryParams :: Subs -> Text -> Aeson.Value -> Expectation -testQueryParams f q expected = graphqlSubs schema f q >>= flip shouldBe expected +testQueryParams f q expected = + runIdentity (graphqlSubs schema f q) `shouldBe` expected -- cgit v1.2.3