Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed mongo tests

  • Loading branch information...
commit f294b88328386c5655938439b2652d0dd55ff380 1 parent 74ec930
@eltimn eltimn authored
View
12 persistence/mongodb-record/src/test/scala/net/liftweb/mongodb/record/MongoRecordSpec.scala
@@ -620,6 +620,8 @@ object MongoRecordSpec extends Specification("MongoRecord Specification") with M
}
"reset dirty flags on save" in {
+ checkMongoIsRunning
+
val fttr = FieldTypeTestRecord.createRecord.save
fttr.mandatoryDecimalField(BigDecimal("3.14"))
fttr.dirtyFields.length must_== 1
@@ -628,6 +630,8 @@ object MongoRecordSpec extends Specification("MongoRecord Specification") with M
}
"update dirty fields for a FieldTypeTestRecord" in {
+ checkMongoIsRunning
+
val fttr = FieldTypeTestRecord.createRecord
.legacyOptionalStringField("legacy optional string")
.optionalStringField("optional string")
@@ -672,6 +676,8 @@ object MongoRecordSpec extends Specification("MongoRecord Specification") with M
}
"update dirty fields for a MongoFieldTypeTestRecord" in {
+ checkMongoIsRunning
+
val mfttr = MongoFieldTypeTestRecord.createRecord
.legacyOptionalDateField(new Date)
.legacyOptionalObjectIdField(ObjectId.get)
@@ -714,6 +720,8 @@ object MongoRecordSpec extends Specification("MongoRecord Specification") with M
}
"update dirty fields for a ListTestRecord" in {
+ checkMongoIsRunning
+
val ltr = ListTestRecord.createRecord.save
ltr.mandatoryStringListField(List("abc", "def", "ghi"))
@@ -734,6 +742,8 @@ object MongoRecordSpec extends Specification("MongoRecord Specification") with M
}
"update dirty fields for a MapTestRecord" in {
+ checkMongoIsRunning
+
val mtr = MapTestRecord.save
mtr.mandatoryStringMapField(Map("a" -> "abc", "b" -> "def", "c" -> "ghi"))
@@ -752,6 +762,8 @@ object MongoRecordSpec extends Specification("MongoRecord Specification") with M
}
"update dirty fields for a SubRecordTestRecord" in {
+ checkMongoIsRunning
+
val srtr = SubRecordTestRecord.createRecord.save
val ssr1 = SubSubRecord.createRecord.name("SubSubRecord1")
Please sign in to comment.
Something went wrong with that request. Please try again.