Skip to content

Commit

Permalink
Fixed MongoSave tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
eltimn committed Apr 27, 2014
1 parent 2a9a935 commit 86d6f1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,7 @@ class MongoClientSaveSpec extends Specification with MongoTestKit {
sd1.save()
sd2.save(false) // no exception thrown
sd2.save(true) must throwA[MongoException]
sd2.saveBox() match {
case Failure(msg, _, _) => msg must contain("E11000 duplicate key error")
case _ => failure
}
sd2.saveBox().toOption must beNone // exception thrown
sd3.save()

success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ class MongoSaveSpec extends Specification with MongoTestKit {
sd1.save()
sd2.save(false) // no exception thrown
sd2.save(true) must throwA[MongoException]
sd2.saveBox() match {
case Failure(msg, _, _) => msg must contain("E11000 duplicate key error")
case _ => failure
}
sd2.saveBox().toOption must beSome // no exception thrown
sd3.save()

success
Expand Down

0 comments on commit 86d6f1c

Please sign in to comment.