Skip to content

Commit

Permalink
Added test for default case
Browse files Browse the repository at this point in the history
  • Loading branch information
xonstone committed May 20, 2022
1 parent de65b02 commit 40b2aa3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions playlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,20 @@ func TestGetPlaylistItemsOverride(t *testing.T) {
}
}

func TestGetPlaylistItemsDefault(t *testing.T) {
var types string
client, server := testClientString(http.StatusForbidden, "", func(r *http.Request) {
types = r.URL.Query().Get("additional_types")
})
defer server.Close()

_, _ = client.GetPlaylistItems(context.Background(), "playlistID")

if types != "episode,track" {
t.Errorf("Expected additional type episode, got %s\n", types)
}
}

func TestUserFollowsPlaylist(t *testing.T) {
client, server := testClientString(http.StatusOK, `[ true, false ]`)
defer server.Close()
Expand Down

0 comments on commit 40b2aa3

Please sign in to comment.