1package service23import (4 "context"5 "errors"6 "testing"7)89// A server without the Podcasts app says so, rather than failing oddly.10func TestNoPodcasts(t *testing.T) {11 s := &Service{}12 if info, _ := s.Info(context.Background()); info.Podcasts {13 t.Error("info says there are podcasts")14 }15 if _, err := s.Podcasts(context.Background()); !errors.Is(err, ErrNoPodcasts) {16 t.Errorf("podcasts: %v", err)17 }18 if _, err := s.PlayEpisode(context.Background(), "mac", "e1", 0); !errors.Is(err, ErrNoPodcasts) {19 t.Errorf("play: %v", err)20 }21}