graphql-engine/server/lib/dc-api/test/Test/ConfigSpec.hs
Lyndon Maydwell 4b968b17e0 ConfigSpec Data Connector Agent Test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6616
GitOrigin-RevId: dd5582cd6b61b7412d931035c043daa5fbb55c71
2022-11-01 21:38:12 +00:00

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` []