test(catalogseed): cover unknown color range

This commit is contained in:
Quick104
2026-07-21 13:03:53 -04:00
parent 4b3362d32e
commit b822bb7181
+10 -4
View File
@@ -11,13 +11,19 @@ func TestToVideoTrackRecordsPreservesColorRange(t *testing.T) {
got := toVideoTrackRecords([]models.VideoTrack{
{ColorRange: "tv"},
{ColorRange: "pc"},
{ColorRange: "unknown"},
})
if len(got) != 2 {
t.Fatalf("records length = %d, want 2", len(got))
if len(got) != 3 {
t.Fatalf("records length = %d, want 3", len(got))
}
if got[0].ColorRange != "tv" || got[1].ColorRange != "pc" {
t.Fatalf("ColorRange values = [%q, %q], want [tv, pc]", got[0].ColorRange, got[1].ColorRange)
if got[0].ColorRange != "tv" || got[1].ColorRange != "pc" || got[2].ColorRange != "unknown" {
t.Fatalf(
"ColorRange values = [%q, %q, %q], want [tv, pc, unknown]",
got[0].ColorRange,
got[1].ColorRange,
got[2].ColorRange,
)
}
}