Skip to content

Commit

Permalink
[AB#1669514] add test for SQL Null time
Browse files Browse the repository at this point in the history
  • Loading branch information
ChronosMasterOfAllTime committed Sep 23, 2024
1 parent 0d5b162 commit e0b541f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,14 @@ func TestValueToString(t *testing.T) {
assertNilE(t, bv.schema)
assertEqualE(t, *bv.value, expectedString)

t.Run("SQL Time", func(t *testing.T) {
bv, err := valueToString(sql.NullTime{Time: localTime, Valid: true}, timestampLtzType, nil)
assertNilF(t, err)
assertEmptyStringE(t, bv.format)
assertNilE(t, bv.schema)
assertEqualE(t, *bv.value, expectedUnixTime)
})

t.Run("arrays", func(t *testing.T) {
bv, err := valueToString([2]int{1, 2}, objectType, nil)
assertNilF(t, err)
Expand Down

0 comments on commit e0b541f

Please sign in to comment.