This commit is contained in:
ponzischeme89
2026-08-21 22:40:31 +12:00
parent 32019f2e20
commit c85fab4459
15 changed files with 417 additions and 248 deletions
+10
View File
@@ -126,6 +126,16 @@ func TestNormalizePreferencesKeepsMultiOrderAndDedupes(t *testing.T) {
}
}
func TestNormalizePreferencesFoldsLegacyGenreIntoMetadataInformation(t *testing.T) {
result := normalizePreferences(map[string]any{
"metadataHeroContentOrder": []any{"title", "ratings", "genres", "summary"},
})
want := []string{"title", "ratings", "facts", "summary"}
if !reflect.DeepEqual(result["metadataHeroContentOrder"], want) {
t.Errorf("metadataHeroContentOrder = %v, want %v", result["metadataHeroContentOrder"], want)
}
}
// Free-form row ids are stored newline-separated on the television, so an id containing
// one would come back as two rows on the next sync.
func TestNormalizePreferencesRejectsNewlinesInRowIds(t *testing.T) {