diff --git a/server/public/model/custom_profile_attributes_test.go b/server/public/model/custom_profile_attributes_test.go index 286c9e1ee6b..e0b65ad788e 100644 --- a/server/public/model/custom_profile_attributes_test.go +++ b/server/public/model/custom_profile_attributes_test.go @@ -181,6 +181,20 @@ func TestCPAFieldToPropertyField(t *testing.T) { }, }, }, + { + name: "convert CPA field with empty attributes", + cpaField: &CPAField{ + PropertyField: PropertyField{ + ID: NewId(), + GroupID: CustomProfileAttributesPropertyGroupName, + Name: "Empty Field", + Type: PropertyFieldTypeText, + CreateAt: GetMillis(), + UpdateAt: GetMillis(), + }, + Attrs: CPAAttrs{}, + }, + }, } for _, tt := range tests {