diff options
author | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-05-27 18:25:09 +0200 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2011-05-27 18:25:09 +0200 |
commit | e2cce1b341fdbf65c270c7e64bb2f5264b8a4468 (patch) | |
tree | 081d546954662876f4af1d98c2b376921b38d94e /tests/Hakyll/Core/Store | |
parent | 0807e4c49aeb66fdbe9ea9a755b6865bfb075336 (diff) | |
parent | 5849ab36c784eebc6f0d9ae2ff7efe91c2f6e4ac (diff) | |
download | hakyll-e2cce1b341fdbf65c270c7e64bb2f5264b8a4468.tar.gz |
Merge branch 'master' into type-safe-identifiers
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) |