package viral

import (
	"testing"

	"haixun-backend/internal/library/placement"
)

func TestBuildReferenceAccountsFromScan_relaxedFallback(t *testing.T) {
	got := BuildReferenceAccountsFromScan(ReferenceAccountInput{
		SeedQuery: "轉職",
		Label:     "轉職",
		Posts: []placement.ScanCandidate{
			{Author: "warm_user", Text: "轉職心得分享", SearchTag: "轉職", LikeCount: 10, ReplyCount: 2, EngagementScore: 32},
		},
		Limit: 5,
	})
	if len(got) != 1 {
		t.Fatalf("expected relaxed fallback account, got %d", len(got))
	}
	if got[0].AuthorVerified {
		t.Fatal("verified must stay false when not provided")
	}
}
