mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-20 22:11:45 +03:00
a9f77acb32
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7167 Co-authored-by: Daniel Chambers <1214352+daniel-chambers@users.noreply.github.com> GitOrigin-RevId: 926e7282b908e3a9669ac39d625aa54971e11c37
23 lines
702 B
Haskell
23 lines
702 B
Haskell
{-# LANGUAGE QuasiQuotes #-}
|
|
|
|
module Hasura.Backends.DataConnector.API.V0.ScalarSpec (spec, genScalarType) where
|
|
|
|
import Data.Aeson.QQ.Simple (aesonQQ)
|
|
import Hasura.Backends.DataConnector.API.V0.Scalar
|
|
import Hasura.Generator.Common (defaultRange, genArbitraryAlphaNumTextExcluding)
|
|
import Hasura.Prelude
|
|
import Hedgehog
|
|
import Test.Aeson.Utils
|
|
import Test.Hspec
|
|
|
|
spec :: Spec
|
|
spec = do
|
|
describe "ScalarType" $ do
|
|
testToFromJSONToSchema (ScalarType "foo") [aesonQQ|"foo"|]
|
|
jsonOpenApiProperties genScalarType
|
|
|
|
genScalarType :: (MonadGen m, GenBase m ~ Identity) => m ScalarType
|
|
genScalarType =
|
|
ScalarType
|
|
<$> genArbitraryAlphaNumTextExcluding ["string", "number", "bool"] defaultRange
|