The first public release of Fabled Minstrel #158
@@ -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"}) {
|
||||
|
||||
Reference in New Issue
Block a user