Skip to content

Commit

Permalink
Fixes #1573 - Failing Mongo Specs due to error message changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eltimn committed Jun 14, 2014
1 parent 1243bf6 commit e6bc89d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class MongoDirectSpec extends Specification with MongoTestKit {
coll.save(doc)
db.getLastError.get("err") must beNull
coll.save(doc2)
db.getLastError.get("err").toString must startWith("E11000 duplicate key error index")
db.getLastError.get("err").toString must contain("E11000 duplicate key error index")
coll.save(doc3)
db.getLastError.get("err") must beNull

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ class MongoDocumentExamplesSpec extends Specification with MongoTestKit {
SessCollection.save(tc, db)
db.getLastError.get("err") must beNull
SessCollection.save(tc2, db)
db.getLastError.get("err").toString must startWith("E11000 duplicate key error index")
db.getLastError.get("err").toString must contain("E11000 duplicate key error index")
SessCollection.save(tc3, db)
db.getLastError.get("err") must beNull

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2011 WorldWide Conferencing, LLC
* Copyright 2011-2014 WorldWide Conferencing, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,7 +33,7 @@ package queryexamplesfixtures {
object Person extends MongoDocumentMeta[Person] {
override def formats = allFormats
// index name
ensureIndex(("name" -> 1))
createIndex(("name" -> 1))

// implicit formats already exists
def findAllBornAfter(dt: Date) = findAll(("birthDate" -> ("$gt" -> dt)))
Expand Down

0 comments on commit e6bc89d

Please sign in to comment.