summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Web/Template/Context/Tests.hs
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-05-06 23:32:25 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2013-05-06 23:32:25 +0200
commitcf138a415b0fbfa5153deec693f1310547f359b2 (patch)
tree106de43225a4ac3ea4c3b71b7dbf8d99fdd5b2c7 /tests/Hakyll/Web/Template/Context/Tests.hs
parent738fd3d1ad36c7d799d2f47ed31022bfd86b88f4 (diff)
downloadhakyll-cf138a415b0fbfa5153deec693f1310547f359b2.tar.gz
Implement foreach structure
Diffstat (limited to 'tests/Hakyll/Web/Template/Context/Tests.hs')
-rw-r--r--tests/Hakyll/Web/Template/Context/Tests.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/Hakyll/Web/Template/Context/Tests.hs b/tests/Hakyll/Web/Template/Context/Tests.hs
index 5533c71..627624f 100644
--- a/tests/Hakyll/Web/Template/Context/Tests.hs
+++ b/tests/Hakyll/Web/Template/Context/Tests.hs
@@ -51,4 +51,9 @@ testContextDone :: Store -> Provider -> Identifier -> String
testContextDone store provider identifier key context =
testCompilerDone store provider identifier $ do
item <- getResourceBody
- unContext context key item
+ cf <- unContext context key item
+ case cf of
+ StringField str -> return str
+ ListField _ _ -> error $
+ "Hakyll.Web.Template.Context.Tests.testContextDone: " ++
+ "Didn't expect ListField"