aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/xyz/driver/core/database/DatabaseTest.scala
blob: dafcd8067b4ccd9233db75fedb654183d8702e79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package xyz.driver.core.database

import org.scalatest.{FlatSpec, Matchers}
import org.scalatest.prop.Checkers

class DatabaseTest extends FlatSpec with Matchers with Checkers {
  "Date SQL converter" should "correctly convert back and forth to SQL dates" in {
    import xyz.driver.core.generators.nextDate

    for (date <- 1 to 100 map (_ => nextDate())) {
      sqlDateToDate(dateToSqlDate(date)) should be(date)
    }
  }
}