From cf138a415b0fbfa5153deec693f1310547f359b2 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Mon, 6 May 2013 23:32:25 +0200 Subject: Implement foreach structure --- tests/Hakyll/Web/Template/Context/Tests.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/Hakyll/Web/Template/Context') 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" -- cgit v1.2.3