Skip to content
This repository
Browse code

Issue #1280: Adding noTime tests.

  • Loading branch information...
commit 6d55cd38d5c22b727af99ae5da4c35c06780720d 1 parent daee7f9
Torsten Uhlmann authored June 17, 2012
6  core/util/src/test/scala/net/liftweb/util/TimeHelpersSpec.scala
@@ -128,6 +128,12 @@ object TimeHelpersSpec extends Specification("TimeHelpers Specification") with S
128 128
     "provide a noTime function on Date objects to transform a date into a date at the same day but at 00:00" in {
129 129
       hourFormat(timeNow.noTime) must_== "00:00:00"
130 130
     }
  131
+
  132
+    "make sure noTime does not change the day" in {
  133
+      dateFormatter.format(0.days.ago.noTime) must_== dateFormatter.format(new Date())
  134
+      dateFormatter.format(3.days.ago.noTime) must_== dateFormatter.format(new Date(millis - (3 * 24 * 60 * 60 * 1000)))
  135
+    }
  136
+
131 137
     "provide a day function returning the day of month corresponding to a given date (relative to UTC)" in {
132 138
       day(today.setTimezone(utc).setDay(3).getTime) must_== 3
133 139
     }

0 notes on commit 6d55cd3

Please sign in to comment.
Something went wrong with that request. Please try again.