summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Core/Runtime
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll/Core/Runtime')
-rw-r--r--tests/Hakyll/Core/Runtime/Tests.hs22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/Hakyll/Core/Runtime/Tests.hs b/tests/Hakyll/Core/Runtime/Tests.hs
index c68d99e..8a05824 100644
--- a/tests/Hakyll/Core/Runtime/Tests.hs
+++ b/tests/Hakyll/Core/Runtime/Tests.hs
@@ -20,7 +20,8 @@ import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
-tests = testGroup "Hakyll.Core.Runtime.Tests" $ fromAssertions "run" [case01]
+tests = testGroup "Hakyll.Core.Runtime.Tests" $
+ fromAssertions "run" [case01, case02]
--------------------------------------------------------------------------------
@@ -48,3 +49,22 @@ case01 = do
head (lines bodies) @?= "This is an example."
cleanTestEnv
+
+
+--------------------------------------------------------------------------------
+case02 :: Assertion
+case02 = do
+ _ <- run testConfiguration Logger.Error $ do
+ match "images/favicon.ico" $ do
+ route $ gsubRoute "images/" (const "")
+ compile $ makeItem ("Test" :: String)
+
+ match "images/**" $ do
+ route idRoute
+ compile copyFileCompiler
+
+ favicon <- readFile $
+ destinationDirectory testConfiguration </> "favicon.ico"
+ favicon @?= "Test"
+
+ cleanTestEnv