aboutsummaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
authorEvgeny Kuznetsov <evgeny@kuznetsov.md>2020-01-29 09:56:21 +0300
committerEvgeny Kuznetsov <evgeny@kuznetsov.md>2020-01-29 09:56:21 +0300
commitc300ef4b6c0911f3ca6631300e78f3db16ba06eb (patch)
tree4c900020ba34c6a2f4aa750d9f12fe1c7b4f2562 /main_test.go
parent0dfb7a7190b5039177627abc0cb8eed48313378b (diff)
downloadradiorus-rss-c300ef4b6c0911f3ca6631300e78f3db16ba06eb.tar.gz
radiorus-rss-c300ef4b6c0911f3ca6631300e78f3db16ba06eb.zip
don't make feed title a link
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go
index b3d1b7f..ce58e2a 100644
--- a/main_test.go
+++ b/main_test.go
@@ -226,3 +226,22 @@ func TestEpisodeID(t *testing.T) {
}
}
}
+
+func TestStripLink(t *testing.T) {
+ type testval struct {
+ raw string
+ ret string
+ }
+
+ var tests = []testval{
+ {`<a href="/brand/57083">"Аэростат"</a>`, `"Аэростат"`},
+ }
+
+ for _, test := range tests {
+ got := stripLink(test.raw)
+ want := test.ret
+ if got != want {
+ t.Error("want:", want, "got:", got)
+ }
+ }
+}