chore: gofumpt style
This commit is contained in:
parent
d4b7f3ddb8
commit
4b16c15d93
@ -1,9 +1,10 @@
|
||||
package tests_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gorm.io/gorm"
|
||||
. "gorm.io/gorm/utils/tests"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMany2ManyAssociation(t *testing.T) {
|
||||
|
@ -830,11 +830,11 @@ func TestUniqueColumn(t *testing.T) {
|
||||
value, ok = ct.DefaultValue()
|
||||
AssertEqual(t, "", value)
|
||||
AssertEqual(t, false, ok)
|
||||
|
||||
}
|
||||
|
||||
func findColumnType(dest interface{}, columnName string) (
|
||||
foundColumn gorm.ColumnType, err error) {
|
||||
foundColumn gorm.ColumnType, err error,
|
||||
) {
|
||||
columnTypes, err := DB.Migrator().ColumnTypes(dest)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("ColumnTypes err:%v", err)
|
||||
|
@ -113,7 +113,6 @@ func TestSerializer(t *testing.T) {
|
||||
}
|
||||
|
||||
AssertEqual(t, result, data)
|
||||
|
||||
}
|
||||
|
||||
func TestSerializerAssignFirstOrCreate(t *testing.T) {
|
||||
@ -152,7 +151,7 @@ func TestSerializerAssignFirstOrCreate(t *testing.T) {
|
||||
}
|
||||
AssertEqual(t, result, out)
|
||||
|
||||
//update record
|
||||
// update record
|
||||
data.Roles = append(data.Roles, "r3")
|
||||
data.JobInfo.Location = "Gates Hillman Complex"
|
||||
if err := DB.Assign(data).FirstOrCreate(&out).Error; err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user