entc/integ: add tests for default-func

This commit is contained in:
Ariel Mashraki
2021-01-04 11:45:36 +02:00
parent d514d12dab
commit 2ab0c682db
10 changed files with 86 additions and 11 deletions

View File

@@ -185,9 +185,7 @@ func TestBytes(t *testing.T) {
fd = field.Bytes("uuid").
GoType(&uuid.UUID{}).
DefaultFunc(func() uuid.UUID {
return uuid.New()
}).
DefaultFunc(uuid.New).
Descriptor()
assert.NoError(t, fd.Err)
assert.Equal(t, "uuid.UUID", fd.Info.Ident)