Test instances for LecturerType
This commit is contained in:
parent
976c50f5de
commit
59baf88294
@ -141,6 +141,10 @@ instance Arbitrary AuthenticationMode where
|
|||||||
shrink AuthLDAP = []
|
shrink AuthLDAP = []
|
||||||
shrink (AuthPWHash _) = [AuthLDAP]
|
shrink (AuthPWHash _) = [AuthLDAP]
|
||||||
|
|
||||||
|
instance Arbitrary LecturerType where
|
||||||
|
arbitrary = genericArbitrary
|
||||||
|
shrink = genericShrink
|
||||||
|
|
||||||
|
|
||||||
spec :: Spec
|
spec :: Spec
|
||||||
spec = do
|
spec = do
|
||||||
@ -199,6 +203,8 @@ spec = do
|
|||||||
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, hashableLaws, jsonLaws, pathPieceLaws, jsonKeyLaws ]
|
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, hashableLaws, jsonLaws, pathPieceLaws, jsonKeyLaws ]
|
||||||
lawsCheckHspec (Proxy @AuthTagActive)
|
lawsCheckHspec (Proxy @AuthTagActive)
|
||||||
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws ]
|
[ eqLaws, ordLaws, showReadLaws, jsonLaws, persistFieldLaws ]
|
||||||
|
lawsCheckHspec (Proxy @LecturerType)
|
||||||
|
[ eqLaws, ordLaws, showReadLaws, boundedEnumLaws, finiteLaws, jsonLaws, pathPieceLaws, persistFieldLaws ]
|
||||||
|
|
||||||
describe "TermIdentifier" $ do
|
describe "TermIdentifier" $ do
|
||||||
it "has compatible encoding/decoding to/from Text" . property $
|
it "has compatible encoding/decoding to/from Text" . property $
|
||||||
|
|||||||
Reference in New Issue
Block a user