diff options
Diffstat (limited to 'main_test.go')
-rw-r--r-- | main_test.go | 19 |
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) + } + } +} |