diff options
author | vlad <vlad@driver.xyz> | 2017-06-16 11:12:52 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-06-16 11:12:52 -0700 |
commit | 111311fd935d9bd271c673cf10c0babe54bde8a6 (patch) | |
tree | 4742679ca244bb417e3d8fdacd51f269f4b969ae /src/test/scala/xyz/driver/pdsuidomain | |
parent | c1993e0f834cb4e0ccfd1dd54610ffe50de60238 (diff) | |
download | rest-query-111311fd935d9bd271c673cf10c0babe54bde8a6.tar.gz rest-query-111311fd935d9bd271c673cf10c0babe54bde8a6.tar.bz2 rest-query-111311fd935d9bd271c673cf10c0babe54bde8a6.zip |
Update PDS UI common code to be up to datev0.1.5
Diffstat (limited to 'src/test/scala/xyz/driver/pdsuidomain')
-rw-r--r-- | src/test/scala/xyz/driver/pdsuidomain/DocumentSuite.scala | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/test/scala/xyz/driver/pdsuidomain/DocumentSuite.scala b/src/test/scala/xyz/driver/pdsuidomain/DocumentSuite.scala index 78edc10..3955667 100644 --- a/src/test/scala/xyz/driver/pdsuidomain/DocumentSuite.scala +++ b/src/test/scala/xyz/driver/pdsuidomain/DocumentSuite.scala @@ -13,21 +13,22 @@ class DocumentSuite extends BaseSuite { "can't submit invalid data" - { val base = sampleDocument - val now = LocalDate.now() - val past1 = now.minus(2, ChronoUnit.DAYS) - val past2 = past1.plus(1, ChronoUnit.DAYS) + val now = LocalDate.now() + val past1 = now.minus(2, ChronoUnit.DAYS) + val past2 = past1.plus(1, ChronoUnit.DAYS) val future1 = now.plus(1, ChronoUnit.DAYS) val future2 = future1.plus(1, ChronoUnit.DAYS) Seq( - "startDate should be non-empty" -> base.copy(startDate = None), - "startDate should be greater, than endDate" -> base.copy(startDate = Some(past2), endDate = Some(past1)), + "startDate should be non-empty" -> base.copy(startDate = None), + "startDate should be greater, than endDate" -> base.copy(startDate = Some(past2), endDate = Some(past1)), "startDate and endDate should be in the past" -> base.copy(startDate = Some(future1), endDate = Some(future2)) - ).foreach { case (title, orig) => - s"$title" in { - val r = Document.validator(orig) - assert(r.isLeft, s"should fail, but: ${r.right}") - } + ).foreach { + case (title, orig) => + s"$title" in { + val r = Document.validator(orig) + assert(r.isLeft, s"should fail, but: ${r.right}") + } } } } |