Simplify JSON notation in tests

This commit is contained in:
Danny Navarro 2016-02-05 12:54:04 +01:00
parent c81ddb0335
commit 53e101f35e

View File

@ -10,7 +10,7 @@ import Data.Traversable (traverse)
import Control.Applicative (Alternative, (<|>), empty, liftA2)
import Data.Maybe (catMaybes)
import qualified Data.Aeson as Aeson
import Data.Aeson (object, (.=))
import Data.Text (Text)
import Test.Tasty (TestTree, testGroup)
@ -26,7 +26,7 @@ test :: TestTree
test = testGroup "Basic Queries"
[testCase "R2-D2"
$ graphql schema "query HeroNameQuery{hero{name}}"
@?= Just (Aeson.Object [("hero", Aeson.Object [("name", "R2-D2")])])
@?= Just (object ["hero" .= object ["name" .= ("R2-D2" :: Text)]])
]
-- * Schema