diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-05-25 11:24:33 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-05-25 11:24:33 +0200 |
commit | d004dc19996c5d1a96a36c46c2580c3f0db33261 (patch) | |
tree | 9976bcbf12d2b91c069275d6345e929d61184b36 /tests/Hakyll/Core/Store | |
parent | 63a637f27cc51006c6b432337c232c17bfe0b0c2 (diff) | |
download | hakyll-d004dc19996c5d1a96a36c46c2580c3f0db33261.tar.gz |
Test for UnixFilter
Diffstat (limited to 'tests/Hakyll/Core/Store')
-rw-r--r-- | tests/Hakyll/Core/Store/Tests.hs | 9 |
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) |