feat: integrate creator hub douyin workflows

This commit is contained in:
2026-09-14 19:22:07 +08:00
parent 025fe62c37
commit 44a28954cf
42 changed files with 2850 additions and 880 deletions
+23
View File
@@ -44,3 +44,26 @@ func TestCollectionWindowIsFixedInUTC(t *testing.T) {
t.Fatal("window must include both exact boundaries only")
}
}
func TestPublishedAtCollectionWindowRejectsFutureItems(t *testing.T) {
start := time.Date(2026, 3, 1, 0, 0, 0, 0, time.UTC)
end := start.Add(24 * time.Hour)
before, atStart, atEnd, after := start.Add(-time.Nanosecond), start, end, end.Add(time.Nanosecond)
for _, test := range []struct {
name string
at *time.Time
want bool
}{
{name: "unknown", at: nil, want: true},
{name: "before", at: &before, want: false},
{name: "start", at: &atStart, want: true},
{name: "end", at: &atEnd, want: true},
{name: "future", at: &after, want: false},
} {
t.Run(test.name, func(t *testing.T) {
if got := publishedAtInCollectionWindow(test.at, start, end); got != test.want {
t.Fatalf("publishedAtInCollectionWindow(%v) = %v, want %v", test.at, got, test.want)
}
})
}
}