summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Core/Store
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-05-25 11:24:33 +0200
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-05-25 11:24:33 +0200
commitd004dc19996c5d1a96a36c46c2580c3f0db33261 (patch)
tree9976bcbf12d2b91c069275d6345e929d61184b36 /tests/Hakyll/Core/Store
parent63a637f27cc51006c6b432337c232c17bfe0b0c2 (diff)
downloadhakyll-d004dc19996c5d1a96a36c46c2580c3f0db33261.tar.gz
Test for UnixFilter
Diffstat (limited to 'tests/Hakyll/Core/Store')
-rw-r--r--tests/Hakyll/Core/Store/Tests.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Hakyll/Core/Store/Tests.hs b/tests/Hakyll/Core/Store/Tests.hs
index 4f35abd..53ad74e 100644
--- a/tests/Hakyll/Core/Store/Tests.hs
+++ b/tests/Hakyll/Core/Store/Tests.hs
@@ -15,6 +15,7 @@ import qualified Test.HUnit as H
import Hakyll.Core.Identifier
import Hakyll.Core.Store
+import TestSuite.Util
tests :: [Test]
tests =
@@ -28,7 +29,7 @@ simpleSetGet = monadicIO $ do
identifier <- parseIdentifier . unFileName <$> pick arbitrary
FileName name <- pick arbitrary
value <- pick arbitrary
- store <- run $ makeStore "_store"
+ store <- run $ makeStoreTest
run $ storeSet store name identifier (value :: String)
value' <- run $ storeGet store name identifier
assert $ Found value == value'
@@ -38,16 +39,16 @@ persistentSetGet = monadicIO $ do
identifier <- parseIdentifier . unFileName <$> pick arbitrary
FileName name <- pick arbitrary
value <- pick arbitrary
- store1 <- run $ makeStore "_store"
+ store1 <- run $ makeStoreTest
run $ storeSet store1 name identifier (value :: String)
-- Now Create another store from the same dir to test persistence
- store2 <- run $ makeStore "_store"
+ store2 <- run $ makeStoreTest
value' <- run $ storeGet store2 name identifier
assert $ Found value == value'
wrongType :: H.Assertion
wrongType = do
- store <- makeStore "_store"
+ store <- makeStoreTest
-- Store a string and try to fetch an int
storeSet store "foo" "bar" ("qux" :: String)
value <- storeGet store "foo" "bar" :: IO (StoreGet Int)