package viral import ( "testing" "haixun-backend/internal/library/placement" ) func TestCountMissionQuality(t *testing.T) { merged := map[string]placement.ScanCandidate{ "a": {Text: "轉職技巧分享", LikeCount: 25, ReplyCount: 4, EngagementScore: 65}, "b": {Text: "轉職", LikeCount: 3, ReplyCount: 0, EngagementScore: 8}, } if got := countMissionQuality(merged); got != 1 { t.Fatalf("expected 1 quality post, got %d", got) } }