diff --git a/copy_proto_test.go b/copy_proto_test.go index 03d786d..3145225 100644 --- a/copy_proto_test.go +++ b/copy_proto_test.go @@ -129,7 +129,8 @@ func TestStructToStruct_Proto(t *testing.T) { func TestStructToStruct_ExistingAnyPreserved(t *testing.T) { existingExtraUser := &testproto.User{ Id: 42, - Username: "username", + Username: "emily", + Role: testproto.Role_REGULAR, } existingExtraUserAny, err := anypb.New(existingExtraUser) require.NoError(t, err) @@ -146,6 +147,7 @@ func TestStructToStruct_ExistingAnyPreserved(t *testing.T) { assert.Equal(t, testUserFull.Id, extraUser.Id) assert.Equal(t, testUserFull.Avatar.OriginalUrl, extraUser.Avatar.OriginalUrl) assert.Equal(t, "username", extraUser.Username) + assert.Equal(t, testproto.Role_REGULAR, extraUser.Role) } func TestStructToStruct_PartialProtoSuccess(t *testing.T) {