summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authornoxx <noxx@noxx-inferno.(none)>2013-05-04 15:42:28 +0300
committernoxx <noxx@noxx-inferno.(none)>2013-05-04 15:42:28 +0300
commitf4ee3e7fcb0817098643c6b34cab92466584680a (patch)
treebfee8395df134a5263e6512a196bb42914f90948 /tests
parent0f779a8c53039829030eb984528974d80372002d (diff)
downloadhakyll-f4ee3e7fcb0817098643c6b34cab92466584680a.tar.gz
Created tests and fixed isMember function
Diffstat (limited to 'tests')
-rw-r--r--tests/Hakyll/Core/Store/Tests.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/Hakyll/Core/Store/Tests.hs b/tests/Hakyll/Core/Store/Tests.hs
index 95140e3..389d7fd 100644
--- a/tests/Hakyll/Core/Store/Tests.hs
+++ b/tests/Hakyll/Core/Store/Tests.hs
@@ -26,6 +26,7 @@ tests = testGroup "Hakyll.Core.Store.Tests"
[ testProperty "simple get . set" simpleSetGet
, testProperty "persistent get . set" persistentSetGet
, testCase "WrongType get . set" wrongType
+ , testCase "isMembertest . set" isMembertest
]
@@ -68,3 +69,18 @@ wrongType = do
t == typeOf (undefined :: String)
_ -> False
cleanTestEnv
+
+
+--------------------------------------------------------------------------------
+
+isMembertest :: H.Assertion
+isMembertest = do
+ store <- newTestStore
+ Store.set store ["foo", "bar"] ("qux" :: String)
+ --value <- Store.get store ["foo", "bar"] :: IO (Store.Result Int)
+ good <- Store.isMember store ["foo", "bar"]
+
+ bad <- Store.isMember store ["foo", "baz"]
+ H.assert good
+ H.assert (not bad)
+ cleanTestEnv \ No newline at end of file