This repository has been archived on 2024-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
fradrive-old/test/MailSpec.hs
2021-03-17 21:15:00 +01:00

28 lines
625 B
Haskell

module MailSpec where
import TestImport
import Utils.DateTimeSpec ()
import Model.TypesSpec ()
import Mail
instance Arbitrary MailSmtpData where
arbitrary = genericArbitrary
shrink = genericShrink
instance Arbitrary MailContext where
arbitrary = genericArbitrary
shrink = genericShrink
instance Arbitrary Address where
arbitrary = genericArbitrary
shrink = genericShrink
spec :: Spec
spec = do
parallel $ do
lawsCheckHspec (Proxy @MailSmtpData)
[ eqLaws, ordLaws, showReadLaws, monoidLaws ]
lawsCheckHspec (Proxy @MailContext)
[ eqLaws, ordLaws, showReadLaws, jsonLaws, hashableLaws ]