diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-04-01 12:26:31 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2010-04-01 12:26:31 +0200 |
commit | 417a9a92d856f7efae6b41d354aab87f575e4b9f (patch) | |
tree | dd22d30d8883c70215d4303611b824aeb2b30939 /tests | |
parent | 1a8f00e7870a187b3281f93314a9d0f889b3e579 (diff) | |
download | hakyll-417a9a92d856f7efae6b41d354aab87f575e4b9f.tar.gz |
Added test case for non-metadata pages.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Page.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/Page.hs b/tests/Page.hs index 1eb8e86..ae1fcd9 100644 --- a/tests/Page.hs +++ b/tests/Page.hs @@ -22,6 +22,7 @@ import Text.Hakyll pageGroup = testGroup "Page" [ testCase "test_readPage_1" test_readPage_1 , testCase "test_readPage_2" test_readPage_2 + , testCase "test_readPage_3" test_readPage_3 ] -- | An abstract function to test page reading. @@ -59,3 +60,11 @@ test_readPage_2 = test_readPage fileName content assertion @? "test_readPage_2" ] assertion page = M.lookup "someSection" page == Just "This is a section.\n" && M.lookup "body" page == Just "This is the body.\n" + +-- | readPage test case 3. +test_readPage_3 = test_readPage fileName content assertion @? "test_readPage_3" + where + fileName = "test_readPage_3.txt" + content = unlines [ "No metadata here, sorry." + ] + assertion page = M.lookup "body" page == Just "No metadata here, sorry.\n" |