Skip to content

Commit

Permalink
Make sql null types test slightly better.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondl committed Jan 9, 2017
1 parent a401257 commit b9e96ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions storer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,13 @@ func TestAttributes_SQLNullTypes(t *testing.T) {
if err := data.Bind(&s, false); err != nil {
t.Error(err)
}

if s.String.Valid != false {
t.Error("Expected nil")
}
if len(s.String.String) != 0 {
t.Error("Expected empty string, got:", s.String.String)
}
}

func TestAttributes_BindTypeFail(t *testing.T) {
Expand Down

0 comments on commit b9e96ae

Please sign in to comment.