From de335333da7bd7b8ea1dd47dc05d9a776b662d5b Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 25 Nov 2026 22:13:00 -0500 Subject: [PATCH] test(subsonic): a library download by search3 leaves out the missing song The fixture's C has a missing file, and search3 now lists only what the listener can play, as getAlbumList2 already did with the same fixture. The paging test expected the old behaviour. Co-Authored-By: Claude Opus 5.5 --- internal/subsonic/opensubsonic_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/subsonic/opensubsonic_test.go b/internal/subsonic/opensubsonic_test.go index 3939023a..e87f28b6 100644 --- a/internal/subsonic/opensubsonic_test.go +++ b/internal/subsonic/opensubsonic_test.go @@ -143,7 +143,8 @@ func (f playHistoryFixture) search3Songs(t *testing.T, query string) (titles []s } // An app that keeps a copy of the library downloads it with an empty query, -// a page at a time; the pages must cover every song once. +// a page at a time; the pages must cover every playable song once. C's file +// is missing in this fixture, so it is left out without shortening a page. func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) { f := seedPlayHistory(t) var all []string @@ -154,7 +155,7 @@ func TestSearch3_EmptyQueryPagesThroughEverySong(t *testing.T) { } all = append(all, page...) } - if want := []string{"A", "B", "C", "D", "E"}; !slices.Equal(all, want) { + if want := []string{"A", "B", "D", "E"}; !slices.Equal(all, want) { t.Errorf("songs across pages = %v, want %v", all, want) } if page, code := f.search3Songs(t, `query=""&songCount=2`); code != 0 || !slices.Equal(page, []string{"A", "B"}) {