{-# LANGUAGE OverloadedStrings #-} module Text.MMark.Extension.ObfuscateEmailSpec (spec) where import Test.Hspec import Text.MMark.Extension.ObfuscateEmail import Text.MMark.Extension.TestUtils spec :: Spec spec = describe "obfuscateEmail" $ do let to = withExt (obfuscateEmail "foo") context "when URI has the mailto scheme" $ it "produces the correct HTML" $ "" `to` "

Enable JavaScript to see this email

\n" context "when URI has some other scheme" $ it "produces the correct HTML" $ "" `to` "

https:example.org

\n" context "other elements" $ it "not affected" $ "Something." `to` "

Something.

\n"