Skip to content

Commit

Permalink
removing the rest of the places were we still use nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
paganotoni authored and markbates committed Jan 23, 2018
1 parent 76240cf commit 9b6ec41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions form/form_for_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package form_test

import (
"database/sql"
"testing"
"time"

"github.com/gobuffalo/tags"
"github.com/gobuffalo/tags/form"
"github.com/markbates/pop/nulls"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -99,11 +99,11 @@ func Test_FormFor_NullableField(t *testing.T) {
r := require.New(t)
model := struct {
Name string
CreditCard nulls.String
Floater nulls.Float64
Other nulls.Bool
CreditCard nullString
Floater sql.NullFloat64
Other sql.NullBool
}{
CreditCard: nulls.NewString("Hello"),
CreditCard: NewNullString("Hello"),
}

f := form.NewFormFor(model, tags.Options{})
Expand Down
3 changes: 1 addition & 2 deletions form/text_area_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/gobuffalo/tags"
"github.com/gobuffalo/tags/form"
"github.com/markbates/pop/nulls"
"github.com/stretchr/testify/require"
)

Expand All @@ -33,7 +32,7 @@ func Test_Form_TextArea_nullsString_empty(t *testing.T) {
r := require.New(t)
f := form.New(tags.Options{})
ta := f.TextArea(tags.Options{
"value": nulls.String{},
"value": nullString{},
})
r.Equal(`<textarea></textarea>`, ta.String())
}
Expand Down

0 comments on commit 9b6ec41

Please sign in to comment.