1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-16 18:01:37 +00:00

Improve content scraper

This commit is contained in:
Frédéric Guillot 2017-12-13 21:30:40 -08:00
parent 827683ab59
commit c6d9eb3614
7 changed files with 39 additions and 3 deletions

View file

@ -58,3 +58,13 @@ func TestRewriteWithXkcdAndNoImage(t *testing.T) {
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
}
}
func TestRewriteWithPDFLink(t *testing.T) {
description := "test"
output := Rewriter("https://example.org/document.pdf", description, ``)
expected := `<a href="https://example.org/document.pdf">PDF</a><br>test`
if expected != output {
t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected)
}
}