fixing tests

This commit is contained in:
Rob Rodriguez 2018-12-10 16:22:42 -08:00
parent a4990ef7fd
commit 25674faa7d

View File

@ -4,8 +4,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"testing" "testing"
"github.com/jinzhu/gorm"
) )
type ( type (
@ -39,7 +37,7 @@ func (m *ComplexWidget) GetType() string {
return "complex" return "complex"
} }
func (m *WidgetUser) EncodeField(scope *gorm.Scope, column string) (interface{}, error) { func (m *WidgetUser) EncodeField(column string) (interface{}, error) {
switch column { switch column {
case "widget": case "widget":
val, err := json.Marshal(m.Widget) val, err := json.Marshal(m.Widget)
@ -52,7 +50,7 @@ func (m *WidgetUser) EncodeField(scope *gorm.Scope, column string) (interface{},
return nil, nil return nil, nil
} }
func (m *WidgetUser) DecodeField(scope *gorm.Scope, column string, value interface{}) error { func (m *WidgetUser) DecodeField(column string, value interface{}) error {
switch column { switch column {
case "widget": case "widget":
b, ok := value.([]byte) b, ok := value.([]byte)