8000 TimeAndDateSpec should test LocalTime printing/encoding using a prepa… · PlayingScala/postgresql-async@7a0fc6c · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a0fc6c

Browse files
author
Chris Kahn
committed
TimeAndDateSpec should test LocalTime printing/encoding using a prepared statement
1 parent 37e5fc5 commit 7a0fc6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

postgresql-async/src/test/scala/com/github/mauricio/async/db/postgresql/TimeAndDateSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class TimeAndDateSpec extends Specification with DatabaseTestHelper {
3535
)"""
3636

3737< 8937 code class="diff-text syntax-highlighted-line">
executeDdl(handler, create)
38-
executeQuery(handler, "INSERT INTO messages (moment) VALUES ('04:05:06')")
38+
executePreparedStatement(handler, "INSERT INTO messages (moment) VALUES (?)", Array[Any](new LocalTime(4, 5, 6)))
3939

4040
val rows = executePreparedStatement(handler, "select * from messages").rows.get
4141

@@ -60,7 +60,7 @@ class TimeAndDateSpec extends Specification with DatabaseTestHelper {
6060
)"""
6161

6262
executeDdl(handler, create)
63-
executeQuery(handler, "INSERT INTO messages (moment) VALUES ('04:05:06.134')")
63+
executePreparedStatement(handler, "INSERT INTO messages (moment) VALUES (?)", Array[Any](new LocalTime(4, 5, 6, 134)))
6464

6565
val rows = executePreparedStatement(handler, "select * from messages").rows.get
6666

0 commit comments

Comments
 (0)
0