mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 21:12:09 +03:00
f4419236ed
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5597 GitOrigin-RevId: 4f561bf476266955d7b1d3dbca4d406a97bf8b34
25 lines
756 B
Haskell
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
|