Add application workflow and lead analytics
This commit is contained in:
@@ -50,6 +50,23 @@ func TestLeadFilter(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateBulkLeadIDs(t *testing.T) {
|
||||
for name, ids := range map[string][]int{
|
||||
"empty": nil,
|
||||
"nonpositive": {1, 0},
|
||||
"duplicate": {1, 1},
|
||||
} {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
if err := validateBulkLeadIDs(ids); err == nil {
|
||||
t.Fatal("expected validation error")
|
||||
}
|
||||
})
|
||||
}
|
||||
if err := validateBulkLeadIDs([]int{3, 1, 2}); err != nil {
|
||||
t.Fatalf("valid ids rejected: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestContainsWord(t *testing.T) {
|
||||
cases := []struct {
|
||||
text, word string
|
||||
|
||||
Reference in New Issue
Block a user