amocrm/tests/tools/construct_test.go
skeris 5d1b11c268
Some checks failed
Deploy / CreateImage (push) Successful in 2m7s
Deploy / DeployService (push) Failing after 20s
ci gitea
2025-02-08 00:52:07 +03:00

26 lines
557 B
Go

package tools
import (
"amocrm/internal/tools"
"fmt"
"gitea.pena/SQuiz/common/model"
"testing"
)
func Test_ConstructAmoTags(t *testing.T) {
color := "Red"
currentTags := []model.Tag{
{ID: 1, Name: "First", Amoid: 111, Color: &color},
{ID: 2, Name: "Iron Man", Amoid: 222, Color: nil},
{ID: 3, Name: "Lionel Messi", Amoid: 333, Color: nil},
}
ruleTags := model.TagsToAdd{
Lead: []int64{111},
Contact: []int64{222, 3333},
Company: []int64{},
Customer: []int64{},
}
fmt.Println(tools.ConstructAmoTags(currentTags, ruleTags))
}