test: add test

This commit is contained in:
Chenrui
2020-12-18 17:36:52 +08:00
parent de27ad816f
commit 6027c164eb

View File

@@ -1746,6 +1746,10 @@ func TestRawQueryRow(t *testing.T) {
throwFail(t, AssertIs(id, 1))
break
case "time":
v = v.(time.Time).In(DefaultTimeLoc)
value := dataValues[col].(time.Time).In(DefaultTimeLoc)
assert.True(t, v.(time.Time).Sub(value) <= time.Second)
break
case "date":
case "datetime":
v = v.(time.Time).In(DefaultTimeLoc)