The catalog feature (approved ASR-0014) was lost during the GitHub history rewrite: the merge commit on main is empty and the code only survived on the old gitea-history branches (no merge base with main). Port catalog/* and the oo catalog CLI verbatim; drop the library-only applications package whose Sync() created the 'Write application'/'Apply application'/'Send CV' CRM task spam (23k+ tasks deleted 2026-08-18).
27 lines
577 B
Go
27 lines
577 B
Go
package catalog
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestMatchAgainstOO_emailThenName(t *testing.T) {
|
|
// MatchAgainstOO needs a live client; unit-test the helpers used by matching.
|
|
c := map[string]any{
|
|
"id": float64(42),
|
|
"isCompany": false,
|
|
"firstName": "Ada",
|
|
"lastName": "Lovelace",
|
|
"email": "ada@example.com",
|
|
"commonData": []any{
|
|
map[string]any{"infoType": "Email", "data": "ada.alt@example.com"},
|
|
},
|
|
}
|
|
if contactIDString(c) != "42" {
|
|
t.Fatal(contactIDString(c))
|
|
}
|
|
emails := contactEmails(c)
|
|
if len(emails) < 2 {
|
|
t.Fatalf("%v", emails)
|
|
}
|
|
}
|