graphql-engine/server/src-test/Hasura/Backends/DataConnector/API/V0/SchemaSpec.hs
David Overton f4419236ed Gdc capabilities scalar types - GDW-87
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5597
GitOrigin-RevId: 4f561bf476266955d7b1d3dbca4d406a97bf8b34
2022-09-06 04:26:03 +00:00

25 lines
756 B
Haskell

{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE QuasiQuotes #-}
module Hasura.Backends.DataConnector.API.V0.SchemaSpec (spec) where
import Data.Aeson.QQ.Simple (aesonQQ)
import Hasura.Backends.DataConnector.API.V0.Schema
import Hasura.Backends.DataConnector.API.V0.TableSpec (genTableInfo)
import Hasura.Generator.Common (defaultRange)
import Hasura.Prelude
import Hedgehog
import Hedgehog.Gen qualified as Gen
import Test.Aeson.Utils
import Test.Hspec
spec :: Spec
spec = do
describe "SchemaResponse" $ do
testToFromJSONToSchema (SchemaResponse []) [aesonQQ|{"tables": []}|]
jsonOpenApiProperties genSchemaResponse
genSchemaResponse :: MonadGen m => m SchemaResponse
genSchemaResponse =
SchemaResponse <$> Gen.list defaultRange genTableInfo