mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-05 14:27:59 +03:00
4b968b17e0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6616 GitOrigin-RevId: dd5582cd6b61b7412d931035c043daa5fbb55c71
13 lines
498 B
Haskell
13 lines
498 B
Haskell
module Test.ConfigSpec (spec) where
|
|
|
|
import Data.Aeson (toJSON)
|
|
import Data.OpenApi.Schema.Validation (validateJSON)
|
|
import Hasura.Backends.DataConnector.API (Config, ConfigSchemaResponse (..))
|
|
import Test.Hspec (Spec, describe, it, shouldBe)
|
|
import Prelude
|
|
|
|
spec :: Config -> ConfigSchemaResponse -> Spec
|
|
spec config configSchema = describe "config" $ do
|
|
it "has a valid config" $ do
|
|
validateJSON (_csrOtherSchemas configSchema) (_csrConfigSchema configSchema) (toJSON config) `shouldBe` []
|