fradrive/backend/test/MailSpec.hs
Sarah Vaupel 72f5a9fb37 build: move backend-related files into backend dir; implement and connect services via docker-compose
TODOs left: reimplement clean and help, sync static,well-known and assets between services
2025-03-23 04:52:49 +01:00

32 lines
746 B
Haskell

-- SPDX-FileCopyrightText: 2022 Gregor Kleen <gregor.kleen@ifi.lmu.de>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later
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 ]