Adds the CPA property group endpoint (#30620)
* Adds the CPA property group endpoint * Fix test calls --------- Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
d2173eb664
Коммит
03d724b6a6
@@ -21,7 +21,7 @@ func TestGetCPAField(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
t.Run("should fail when getting a non-existent field", func(t *testing.T) {
|
||||
@@ -73,7 +73,7 @@ func TestListCPAFields(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
t.Run("should list the CPA property fields", func(t *testing.T) {
|
||||
@@ -117,7 +117,7 @@ func TestCreateCPAField(t *testing.T) {
|
||||
defer os.Unsetenv("MM_FEATUREFLAGS_CUSTOMPROFILEATTRIBUTES")
|
||||
th := Setup(t).InitBasic()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
t.Run("should fail if the field is not valid", func(t *testing.T) {
|
||||
@@ -227,7 +227,7 @@ func TestPatchCPAField(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
newField, err := model.NewCPAFieldFromPropertyField(&model.PropertyField{
|
||||
@@ -363,7 +363,7 @@ func TestDeleteCPAField(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
newField, err := model.NewCPAFieldFromPropertyField(&model.PropertyField{
|
||||
@@ -445,7 +445,7 @@ func TestGetCPAValue(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
fieldID := model.NewId()
|
||||
@@ -522,7 +522,7 @@ func TestListCPAValues(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
userID := model.NewId()
|
||||
@@ -579,7 +579,7 @@ func TestPatchCPAValue(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
cpaGroupID, cErr := th.App.cpaGroupID()
|
||||
cpaGroupID, cErr := th.App.CpaGroupID()
|
||||
require.NoError(t, cErr)
|
||||
|
||||
t.Run("should fail if the field doesn't exist", func(t *testing.T) {
|
||||
|
||||
Ссылка в новой задаче
Block a user