Fix tests
This commit is contained in:
parent
2b79b40bfb
commit
fce531cdda
@ -13,6 +13,9 @@ import System.IO.Unsafe
|
|||||||
import Yesod.Auth.Util.PasswordStore
|
import Yesod.Auth.Util.PasswordStore
|
||||||
|
|
||||||
|
|
||||||
|
instance (Arbitrary a, MonoFoldable a) => Arbitrary (NonNull a) where
|
||||||
|
arbitrary = arbitrary `suchThatMap` fromNullable
|
||||||
|
|
||||||
instance Arbitrary Season where
|
instance Arbitrary Season where
|
||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
@ -62,10 +65,18 @@ instance Arbitrary SubmissionFileType where
|
|||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
|
|
||||||
|
instance Arbitrary UploadSpecificFile where
|
||||||
|
arbitrary = genericArbitrary
|
||||||
|
shrink = genericShrink
|
||||||
|
|
||||||
instance Arbitrary UploadMode where
|
instance Arbitrary UploadMode where
|
||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
|
|
||||||
|
instance Arbitrary UploadModeDescr where
|
||||||
|
arbitrary = genericArbitrary
|
||||||
|
shrink = genericShrink
|
||||||
|
|
||||||
instance Arbitrary SubmissionMode where
|
instance Arbitrary SubmissionMode where
|
||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
@ -148,10 +159,6 @@ instance Arbitrary AuthenticationMode where
|
|||||||
instance Arbitrary LecturerType where
|
instance Arbitrary LecturerType where
|
||||||
arbitrary = genericArbitrary
|
arbitrary = genericArbitrary
|
||||||
shrink = genericShrink
|
shrink = genericShrink
|
||||||
|
|
||||||
instance Arbitrary a => Arbitrary (ZIPArchiveName a) where
|
|
||||||
arbitrary = genericArbitrary
|
|
||||||
shrink = genericShrink
|
|
||||||
|
|
||||||
|
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
@ -177,10 +184,14 @@ spec = do
|
|||||||
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, persistFieldLaws, pathPieceLaws, finiteLaws ]
|
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, persistFieldLaws, pathPieceLaws, finiteLaws ]
|
||||||
lawsCheckHspec (Proxy @SubmissionFileType)
|
lawsCheckHspec (Proxy @SubmissionFileType)
|
||||||
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, pathPieceLaws, finiteLaws ]
|
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, pathPieceLaws, finiteLaws ]
|
||||||
|
lawsCheckHspec (Proxy @UploadSpecificFile)
|
||||||
|
[ eqLaws, showReadLaws, ordLaws, jsonLaws, persistFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @UploadMode)
|
lawsCheckHspec (Proxy @UploadMode)
|
||||||
[ eqLaws, showReadLaws, ordLaws, jsonLaws, persistFieldLaws, pathPieceLaws, finiteLaws ]
|
[ eqLaws, showReadLaws, ordLaws, jsonLaws, persistFieldLaws ]
|
||||||
|
lawsCheckHspec (Proxy @UploadModeDescr)
|
||||||
|
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, finiteLaws, pathPieceLaws ]
|
||||||
lawsCheckHspec (Proxy @SubmissionMode)
|
lawsCheckHspec (Proxy @SubmissionMode)
|
||||||
[ eqLaws, showReadLaws, ordLaws, jsonLaws, persistFieldLaws, finiteLaws ]
|
[ eqLaws, showReadLaws, ordLaws, jsonLaws, persistFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @SubmissionModeDescr)
|
lawsCheckHspec (Proxy @SubmissionModeDescr)
|
||||||
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, finiteLaws, pathPieceLaws ]
|
[ eqLaws, showReadLaws, ordLaws, boundedEnumLaws, finiteLaws, pathPieceLaws ]
|
||||||
lawsCheckHspec (Proxy @ExamStatus)
|
lawsCheckHspec (Proxy @ExamStatus)
|
||||||
@ -215,8 +226,6 @@ spec = do
|
|||||||
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws ]
|
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @LecturerType)
|
lawsCheckHspec (Proxy @LecturerType)
|
||||||
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, jsonLaws, pathPieceLaws, persistFieldLaws ]
|
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, jsonLaws, pathPieceLaws, persistFieldLaws ]
|
||||||
lawsCheckHspec (Proxy @(ZIPArchiveName (CI Text)))
|
|
||||||
[ eqLaws, ordLaws, showReadLaws, pathPieceLaws ]
|
|
||||||
|
|
||||||
describe "TermIdentifier" $ do
|
describe "TermIdentifier" $ do
|
||||||
it "has compatible encoding/decoding to/from Text" . property $
|
it "has compatible encoding/decoding to/from Text" . property $
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user