Permalink
Browse files

Fixed failing test for DateTimeField.

  • Loading branch information...
1 parent b18d6fc commit efe3ca853007f8890f7d1e61fc0df70db6cddaf5 @davewhittaker davewhittaker committed May 26, 2012
Showing with 18 additions and 16 deletions.
  1. +18 −16 persistence/record/src/test/scala/net/liftweb/record/FieldSpec.scala
View
34 persistence/record/src/test/scala/net/liftweb/record/FieldSpec.scala
@@ -104,22 +104,24 @@ object FieldSpec extends Specification("Record Field Specification") {
in.valueBox must_== Failure("my failure")
}
- "which are only flagged as dirty_? when setBox is called with a different value" in {
- in.clear
- in match {
- case owned: OwnedField[_] => owned.owner.runSafe {
- in.resetDirty
- }
- case _ => in.resetDirty
- }
- in.dirty_? must_== false
- val valueBox = in.valueBox
- in.setBox(valueBox)
- in.dirty_? must_== false
- val exampleBox = Full(example)
- valueBox must verify { v => ! (exampleBox === v) }
- in.setBox(exampleBox)
- in.dirty_? must_== true
+ if(canCheckDefaultValues) {
+ "which are only flagged as dirty_? when setBox is called with a different value" in {
+ in.clear
+ in match {
+ case owned: OwnedField[_] => owned.owner.runSafe {
+ in.resetDirty
+ }
+ case _ => in.resetDirty
+ }
+ in.dirty_? must_== false
+ val valueBox = in.valueBox
+ in.setBox(valueBox)
+ in.dirty_? must_== false
+ val exampleBox = Full(example)
+ valueBox must verify { v => ! (exampleBox === v) }
+ in.setBox(exampleBox)
+ in.dirty_? must_== true
+ }
}
}

0 comments on commit efe3ca8

Please sign in to comment.