aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader/rewrite/rewriter_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'reader/rewrite/rewriter_test.go')
-rw-r--r--reader/rewrite/rewriter_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/reader/rewrite/rewriter_test.go b/reader/rewrite/rewriter_test.go
index 9bd83e8..0fd49ba 100644
--- a/reader/rewrite/rewriter_test.go
+++ b/reader/rewrite/rewriter_test.go
@@ -98,6 +98,15 @@ func TestRewriteWithXkcdAndNoImage(t *testing.T) {
}
}
+func TestRewriteMailtoLink(t *testing.T) {
+ description := `<a href="mailto:ryan@qwantz.com?subject=blah%20blah">contact</a>`
+ output := Rewriter("https://www.qwantz.com/", description, ``)
+ expected := `<a href="mailto:ryan@qwantz.com?subject=blah%20blah">contact [blah blah]</a>`
+ if expected != output {
+ 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, ``)