diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2021-07-17 20:19:28 +0200 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2021-07-17 20:19:28 +0200 |
commit | 8ce817dd4453f35ce92afa531c540554429c7299 (patch) | |
tree | 90236cdc7e59bdf99b32467b89adcb8c5a0b8e22 /tests/Hakyll/Web/Html/Tests.hs | |
parent | b861c20ff2d7460061e73492e3a945e48ef40bac (diff) | |
parent | d739fd1eea40de9ded3b4f682c849d3c31eba92c (diff) | |
download | hakyll-8ce817dd4453f35ce92afa531c540554429c7299.tar.gz |
Merge branch 'master' of https://github.com/jaspervdj/hakyll
Diffstat (limited to 'tests/Hakyll/Web/Html/Tests.hs')
-rw-r--r-- | tests/Hakyll/Web/Html/Tests.hs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/Hakyll/Web/Html/Tests.hs b/tests/Hakyll/Web/Html/Tests.hs index cd362f4..9ab10bc 100644 --- a/tests/Hakyll/Web/Html/Tests.hs +++ b/tests/Hakyll/Web/Html/Tests.hs @@ -20,7 +20,18 @@ tests :: TestTree tests = testGroup "Hakyll.Web.Html.Tests" $ concat [ fromAssertions "demoteHeaders" [ "<h2>A h1 title</h2>" @=? - demoteHeaders "<h1>A h1 title</h1>" + demoteHeaders "<h1>A h1 title</h1>" -- Assert single-step demotion + , "<h6>A h6 title</h6>" @=? + demoteHeaders "<h6>A h6 title</h6>" -- Assert maximum demotion is h6 + ] + + , fromAssertions "demoteHeadersBy" + [ "<h3>A h1 title</h3>" @=? + demoteHeadersBy 2 "<h1>A h1 title</h1>" + , "<h6>A h5 title</h6>" @=? + demoteHeadersBy 2 "<h5>A h5 title</h5>" -- Assert that h6 is the lowest possible demoted header. + , "<h4>A h4 title</h4>" @=? + demoteHeadersBy 0 "<h4>A h4 title</h4>" -- Assert that a demotion of @N < 1@ is a no-op. ] , fromAssertions "withUrls" |