package common_test import ( "testing" "time" "fiskerinc.com/modules/common" "fiskerinc.com/modules/common/dbbasemodel" "fiskerinc.com/modules/testhelper" ) func TestSupplierAccount(t *testing.T) { now := time.Now() expected := "SupplierAccount, , , , >" supplier := common.SupplierAccount{ Email: " TEST@TEST.COM ", Company: " Test Company ", Contact: " Test Contact ", Address: " 555 Main, San Francisco, CA 94103 ", Telephone: " +1 555-555-5555 ", Program: " Test Program ", ECUs: []string{"", " TEST ", "TEST1 "}, ActivatedAt: &now, KeysAt: &now, SigninAt: &now, DBModelBase: dbbasemodel.DBModelBase{ CreatedAt: &now, UpdatedAt: &now, }, } supplier.SanitizeData() actual := supplier.String() if actual != expected { t.Errorf(testhelper.TestErrorTemplate, "SupplierAccount", expected, actual) } }