Skip to content

Commit 40a5f71

Browse files
committed
Merge branch 'series_tabs'
2 parents cd6384a + 357795c commit 40a5f71

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tv/tv_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,14 @@ func TestBoxSets(t *testing.T) {
710710
"/iplayer/episodes/p070npjv/fleabag?seriesId=p071bjr7",
711711
bs[0].String())
712712
}
713+
pp := programPage{td.idoc}
714+
ok, su := pp.seriesUrls()
715+
if !ok {
716+
t.Error("Expected seriesUrls call to be ok, got: ", ok)
717+
}
718+
if len(su) != 1 {
719+
t.Errorf("Expected length of sweries urls to be 1, got: %d", len(su))
720+
}
713721

714722
doc = documentLoader("testhtml/wrong_mans.html")
715723
td = TestIplayerDocument{doc}
@@ -719,4 +727,14 @@ func TestBoxSets(t *testing.T) {
719727
"/iplayer/episodes/p02bhkmm/the-wrong-mans?seriesId=p02bhlq2",
720728
bs[0].String())
721729
}
730+
731+
doc = documentLoader("testhtml/gentleman_jack.html")
732+
pp = programPage{doc}
733+
ok, su = pp.seriesUrls()
734+
if ok {
735+
t.Error("Expected seriesUrls call to be false, got ok")
736+
}
737+
if len(su) != 0 {
738+
t.Errorf("Expected length of series urls to be 0, got %d", len(su))
739+
}
722740
}

0 commit comments

Comments
 (0)