Skip to content

Commit 692ff06

Browse files
committed
added more test cases
1 parent 82308ed commit 692ff06

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

iso8601/sql_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ func TestDate_Scan(t *testing.T) {
3535
Value: time.Date(2056, 10, 31, 0, 0, 0, 0, time.UTC),
3636
Expected: Date{2056, 10, 31},
3737
},
38+
{
39+
Name: "Invalid string date",
40+
Value: "abc",
41+
Error: true,
42+
},
3843
{
3944
Name: "Valid byte slice date",
4045
Value: []byte("2157-12-31"),
@@ -50,6 +55,11 @@ func TestDate_Scan(t *testing.T) {
5055
Value: nil,
5156
Expected: Date{},
5257
},
58+
{
59+
Name: "Invalid unknown type",
60+
Value: true,
61+
Error: true,
62+
},
5363
}
5464

5565
for _, tc := range testCases {

0 commit comments

Comments
 (0)