@@ -86,17 +86,21 @@ func TestPrevNextSearchPageErrors(t *testing.T) {
8686 // under either of these conditions:
8787
8888 // 1) there are no results (nil)
89- nilResults := & SearchResult {nil , nil , nil , nil }
89+ nilResults := & SearchResult {nil , nil , nil , nil , nil , nil }
9090 if client .NextAlbumResults (context .Background (), nilResults ) != ErrNoMorePages ||
9191 client .NextArtistResults (context .Background (), nilResults ) != ErrNoMorePages ||
9292 client .NextPlaylistResults (context .Background (), nilResults ) != ErrNoMorePages ||
93- client .NextTrackResults (context .Background (), nilResults ) != ErrNoMorePages {
93+ client .NextTrackResults (context .Background (), nilResults ) != ErrNoMorePages ||
94+ client .NextShowResults (context .Background (), nilResults ) != ErrNoMorePages ||
95+ client .NextEpisodeResults (context .Background (), nilResults ) != ErrNoMorePages {
9496 t .Error ("Next search result page should have failed for nil results" )
9597 }
9698 if client .PreviousAlbumResults (context .Background (), nilResults ) != ErrNoMorePages ||
9799 client .PreviousArtistResults (context .Background (), nilResults ) != ErrNoMorePages ||
98100 client .PreviousPlaylistResults (context .Background (), nilResults ) != ErrNoMorePages ||
99- client .PreviousTrackResults (context .Background (), nilResults ) != ErrNoMorePages {
101+ client .PreviousTrackResults (context .Background (), nilResults ) != ErrNoMorePages ||
102+ client .PreviousShowResults (context .Background (), nilResults ) != ErrNoMorePages ||
103+ client .PreviousEpisodeResults (context .Background (), nilResults ) != ErrNoMorePages {
100104 t .Error ("Previous search result page should have failed for nil results" )
101105 }
102106 // 2) the prev/next URL is empty
@@ -105,17 +109,23 @@ func TestPrevNextSearchPageErrors(t *testing.T) {
105109 Albums : new (SimpleAlbumPage ),
106110 Playlists : new (SimplePlaylistPage ),
107111 Tracks : new (FullTrackPage ),
112+ Shows : new (SimpleShowPage ),
113+ Episodes : new (SimpleEpisodePage ),
108114 }
109115 if client .NextAlbumResults (context .Background (), emptyURL ) != ErrNoMorePages ||
110116 client .NextArtistResults (context .Background (), emptyURL ) != ErrNoMorePages ||
111117 client .NextPlaylistResults (context .Background (), emptyURL ) != ErrNoMorePages ||
112- client .NextTrackResults (context .Background (), emptyURL ) != ErrNoMorePages {
118+ client .NextTrackResults (context .Background (), emptyURL ) != ErrNoMorePages ||
119+ client .NextShowResults (context .Background (), emptyURL ) != ErrNoMorePages ||
120+ client .NextEpisodeResults (context .Background (), emptyURL ) != ErrNoMorePages {
113121 t .Error ("Next search result page should have failed with empty URL" )
114122 }
115123 if client .PreviousAlbumResults (context .Background (), emptyURL ) != ErrNoMorePages ||
116124 client .PreviousArtistResults (context .Background (), emptyURL ) != ErrNoMorePages ||
117125 client .PreviousPlaylistResults (context .Background (), emptyURL ) != ErrNoMorePages ||
118- client .PreviousTrackResults (context .Background (), emptyURL ) != ErrNoMorePages {
126+ client .PreviousTrackResults (context .Background (), emptyURL ) != ErrNoMorePages ||
127+ client .PreviousShowResults (context .Background (), emptyURL ) != ErrNoMorePages ||
128+ client .PreviousEpisodeResults (context .Background (), emptyURL ) != ErrNoMorePages {
119129 t .Error ("Previous search result page should have failed with empty URL" )
120130 }
121131}
0 commit comments