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:
parent
f3eba05359
commit
d2452e0a3b
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user