mirror of
https://github.com/NorfairKing/autodocodec.git
synced 2024-11-30 03:22:52 +03:00
moved the test resources around a bit
This commit is contained in:
parent
3703c2cd31
commit
d9095e0c02
@ -126,7 +126,7 @@ jsonSchemaSpec filePath =
|
||||
describe ("jsonSchemaSpec @" <> nameOf @a) $ do
|
||||
it "outputs the same schema as before" $
|
||||
pureGoldenJSONFile
|
||||
("test_resources/schema/" <> filePath <> ".json")
|
||||
("test_resources/json-schema/" <> filePath <> ".json")
|
||||
(JSON.toJSON (jsonSchemaViaCodec @a))
|
||||
it "validates all encoded values" $
|
||||
forAllValid $ \(a :: a) ->
|
||||
|
@ -70,5 +70,5 @@ swaggerSchemaSpec filePath =
|
||||
pure ()
|
||||
swagger = mempty {_swaggerDefinitions = definitions}
|
||||
in pureGoldenJSONFile
|
||||
("test_resources/swagger/" <> filePath <> ".json")
|
||||
("test_resources/swagger-schema/" <> filePath <> ".json")
|
||||
(JSON.toJSON swagger)
|
||||
|
@ -55,4 +55,4 @@ spec = do
|
||||
yamlSchemaSpec :: forall a. (Show a, Eq a, Typeable a, GenValid a, HasCodec a) => FilePath -> Spec
|
||||
yamlSchemaSpec filePath = do
|
||||
it ("outputs the same schema as before for " <> nameOf @a) $
|
||||
pureGoldenByteStringFile ("test_resources/schema/" <> filePath <> ".txt") (renderChunksBS With24BitColours $ schemaChunksViaCodec @a)
|
||||
pureGoldenByteStringFile ("test_resources/yaml-schema/" <> filePath <> ".txt") (renderChunksBS With24BitColours $ schemaChunksViaCodec @a)
|
||||
|
Loading…
Reference in New Issue
Block a user