Minor refactor
Use `shouldReturn`
This commit is contained in:
parent
70e8cbc9c2
commit
c6d6f8c71a
1 changed files with 3 additions and 4 deletions
|
@ -24,10 +24,9 @@ spec :: Spec
|
||||||
spec = around withCleanDatabase $ do
|
spec = around withCleanDatabase $ do
|
||||||
describe "useDb" $ do
|
describe "useDb" $ do
|
||||||
it "changes the db" $ do
|
it "changes the db" $ do
|
||||||
db1 <- fakeDB thisDatabase
|
let anotherDBName = "another-mongodb-haskell-test"
|
||||||
db1 `shouldBe` testDBName
|
fakeDB thisDatabase `shouldReturn` testDBName
|
||||||
db2 <- fakeDB $ useDb "another-mongodb-haskell-test" thisDatabase
|
fakeDB (useDb anotherDBName thisDatabase) `shouldReturn` anotherDBName
|
||||||
db2 `shouldBe` "another-mongodb-haskell-test"
|
|
||||||
|
|
||||||
describe "insert" $ do
|
describe "insert" $ do
|
||||||
it "inserts a document to the collection and returns its _id" $ do
|
it "inserts a document to the collection and returns its _id" $ do
|
||||||
|
|
Loading…
Reference in a new issue