aboutsummaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
authorEvgeny Kuznetsov <evgeny@kuznetsov.md>2020-01-28 15:04:03 +0300
committerEvgeny Kuznetsov <evgeny@kuznetsov.md>2020-01-28 15:04:03 +0300
commitf1c749597bcf5588618eccbd2fbb7797b42eb713 (patch)
treed489ff5f1a589fab5060e5e661ffb8f31fea967d /main_test.go
parent95a896ff9738b28b54d0d77d460ec03ff07c36bd (diff)
downloadradiorus-rss-f1c749597bcf5588618eccbd2fbb7797b42eb713.tar.gz
radiorus-rss-f1c749597bcf5588618eccbd2fbb7797b42eb713.zip
fix episode addressing for tests
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go10
1 files changed, 10 insertions, 0 deletions
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))
+ }
+}