Files
digital-psychology/apps/api/internal/relation/engine_test.go
T
jackyu66gitandCursor 14b836f53b feat: add RelationInsight API and wire H5 relation/profile pages
Second P1 growth engine: compare two profiles, gate full tips behind
deep-access mock payment, and list personal archives on /profile.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:28:10 +08:00

23 lines
517 B
Go

package relation
import (
"strings"
"testing"
"time"
)
func TestBuild(t *testing.T) {
a := time.Date(1990, 1, 15, 0, 0, 0, 0, time.UTC)
b := time.Date(1992, 6, 8, 0, 0, 0, 0, time.UTC)
out := Build(a, b, "我", "TA")
if out.Summary["diff_one_liner"] == nil {
t.Fatal("missing diff")
}
blob := str(out.Summary["diff_one_liner"]) + str(out.Detail["title"])
for _, bad := range []string{"合盘", "运势", "吉凶", "合婚"} {
if strings.Contains(blob, bad) {
t.Fatalf("forbidden %q", bad)
}
}
}