From f1c749597bcf5588618eccbd2fbb7797b42eb713 Mon Sep 17 00:00:00 2001 From: Evgeny Kuznetsov Date: Tue, 28 Jan 2020 15:04:03 +0300 Subject: fix episode addressing for tests --- main_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'main_test.go') diff --git a/main_test.go b/main_test.go index 819f9d0..702146f 100644 --- a/main_test.go +++ b/main_test.go @@ -125,3 +125,13 @@ func helperCleanupFile(t *testing.T, name string) { t.Fatal(err) } } + +func TestEpisodeURLPrefix(t *testing.T) { + url := "http://www.radiorus.ru/brand/57083/episodes" + got := episodeURLPrefix(url) + want := "http://www.radiorus.ru/brand/" + + if got != want { + t.Fatal(fmt.Sprintf("got %v, want %v", got, want)) + } +} -- cgit v1.2.3