test(catalogseed): cover unknown color range
This commit is contained in:
@@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user