mongodb/test/QuerySpec.hs

16 lines
390 B
Haskell
Raw Normal View History

2014-08-18 06:37:05 +00:00
{-# LANGUAGE OverloadedStrings #-}
module QuerySpec (spec) where
2014-08-07 15:54:38 +00:00
import TestImport
fakeDB :: MonadIO m => Action m a -> m a
fakeDB = access (error "Pipe") (error "AccessMode") "fake"
2014-08-18 06:37:05 +00:00
spec :: Spec
spec =
2014-08-07 15:54:38 +00:00
describe "useDb" $
it "changes the db" $ do
db1 <- fakeDB thisDatabase
db1 `shouldBe` "fake"
db2 <- fakeDB $ useDb "use" thisDatabase
db2 `shouldBe` "use"