From aee06af59c748e74e5dc7718c1529527ac8c052a Mon Sep 17 00:00:00 2001 From: "Julien Tant (aider)" Date: Tue, 25 Feb 2025 10:50:29 -0700 Subject: [PATCH] test: Add test case for CPA field with empty attributes --- .../public/model/custom_profile_attributes_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 {