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>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user