summaryrefslogtreecommitdiff
path: root/tests/Page.hs
blob: 705b6ba0f8e03983a08557038bf9c326cc2ed736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Page 
    ( pageGroup
    ) where

import qualified Data.Map as M

import Data.Binary
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.Framework.Providers.QuickCheck2
import Test.HUnit

import Text.Hakyll.Page

-- Page test group.
pageGroup = testGroup "Page"
    [ testProperty "prop_page_encode_id" prop_page_encode_id
    ]

-- Test encoding/decoding of pages.
prop_page_encode_id :: Page -> Bool
prop_page_encode_id page = decode (encode page) == page