1
0
mirror of https://github.com/volatiletech/authboss.git synced 2024-11-28 08:58:38 +02:00

Add test to expose a bug with sql types and nil

This commit is contained in:
Aaron L 2017-01-09 08:52:35 -08:00
parent f3eba05359
commit d2452e0a3b

View File

@ -290,6 +290,19 @@ func TestAttributes_BindMissingField(t *testing.T) {
}
}
func TestAttributes_SQLNullTypes(t *testing.T) {
t.Parallel()
data := Attributes{"string": nil}
s := struct {
String sql.NullString
}{}
if err := data.Bind(&s, false); err != nil {
t.Error(err)
}
}
func TestAttributes_BindTypeFail(t *testing.T) {
t.Parallel()