diff --git a/test/QuerySpec.hs b/test/QuerySpec.hs index 1bd3cc8..eb38a9f 100644 --- a/test/QuerySpec.hs +++ b/test/QuerySpec.hs @@ -24,10 +24,9 @@ spec :: Spec spec = around withCleanDatabase $ do describe "useDb" $ do it "changes the db" $ do - db1 <- fakeDB thisDatabase - db1 `shouldBe` testDBName - db2 <- fakeDB $ useDb "another-mongodb-haskell-test" thisDatabase - db2 `shouldBe` "another-mongodb-haskell-test" + let anotherDBName = "another-mongodb-haskell-test" + fakeDB thisDatabase `shouldReturn` testDBName + fakeDB (useDb anotherDBName thisDatabase) `shouldReturn` anotherDBName describe "insert" $ do it "inserts a document to the collection and returns its _id" $ do