Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii committed Sep 30, 2023
1 parent f79bc25 commit c8446ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ object OptionOps {
}
}
implicit class StringOptionExt(opt: Option[String]) {
def andNotEmpty = opt.flatMap(s => if (s.trim.isEmpty) None else Some(s))
def andNotEmpty: Option[String] = opt.flatMap(s => if (s.trim.isEmpty) None else Some(s))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package io.getquill.context.qzio.jasync.postgres
import io.getquill.context.sql.EncodingTestType
import io.getquill.context.sql.encoding.ArrayEncodingBaseSpec

import java.time.temporal.ChronoUnit
import java.time.{LocalDate, LocalDateTime}
import java.util.{Date, UUID}

Expand All @@ -20,7 +21,7 @@ class ArrayAsyncEncodingSpec extends ArrayEncodingBaseSpec with ZioSpec {

"Java8 times" in {
case class Java8Times(timestamps: Seq[LocalDateTime], dates: Seq[LocalDate])
val jE = Java8Times(Seq(LocalDateTime.now()), Seq(LocalDate.now()))
val jE = Java8Times(Seq(LocalDateTime.now().truncatedTo(ChronoUnit.MICROS)), Seq(LocalDate.now()))
val jQ = quote(querySchema[Java8Times]("ArraysTestEntity"))
runSyncUnsafe(context.run(jQ.insertValue(lift(jE))))
val actual = runSyncUnsafe(context.run(jQ)).head
Expand Down

0 comments on commit c8446ac

Please sign in to comment.