2024-06-08 13:59:13 +00:00
|
|
|
package tools
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2025-02-27 13:30:52 +00:00
|
|
|
"gitea.pena/SQuiz/amocrm/internal/tools"
|
|
|
|
"gitea.pena/SQuiz/common/model"
|
2024-06-08 13:59:13 +00:00
|
|
|
"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{
|
2024-06-19 19:53:35 +00:00
|
|
|
Lead: []int64{111},
|
|
|
|
Contact: []int64{222, 3333},
|
2024-06-08 13:59:13 +00:00
|
|
|
Company: []int64{},
|
|
|
|
Customer: []int64{},
|
|
|
|
}
|
|
|
|
|
|
|
|
fmt.Println(tools.ConstructAmoTags(currentTags, ruleTags))
|
|
|
|
}
|