From 10e823b0c5b7caf922d150a29f14bf630dacd5a1 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Mon, 5 Sep 2022 16:04:37 +0200 Subject: [PATCH] refactor(pandoc): rewrite tests for pandoc applyMetas (2) --- test/PandocSpec.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/PandocSpec.hs b/test/PandocSpec.hs index e52f83752..682792b9a 100644 --- a/test/PandocSpec.hs +++ b/test/PandocSpec.hs @@ -15,10 +15,10 @@ import Text.Pandoc.Arbitrary () -- Instance Arbitrary Meta is somewhat useless, as it always generates the same 3 keys. newtype ArbitraryMeta = ArbitraryMeta { unArbitraryMeta :: Meta } - deriving newtype (Eq, Ord, Semigroup, Monoid, Show, Read, Typable, Data, Generic) + deriving newtype (Eq, Ord, Semigroup, Monoid, Show, Read, Typeable) newtype ArbitraryPandoc = ArbitraryPandoc { unArbitraryPandoc :: Pandoc } - deriving newtype (Eq, Ord, Show, Read, Typable, Data, Generic) + deriving newtype (Eq, Ord, Show, Read, Typeable) instance Arbitrary ArbitraryMeta where arbitrary = do @@ -78,7 +78,7 @@ spec = do (abMetaOverwrite, apd) <- generate arbitrary let metaOverwrite = unArbitraryMeta abMetaOverwrite - pd@(Pandoc metaOriginal _) = unArbitraryPandoc apd + pd = unArbitraryPandoc apd (Pandoc newMeta _) = addMeta metaOverwrite pd (unMeta metaOverwrite `Map.isSubmapOf` unMeta newMeta) `shouldBe` True