diff options
Diffstat (limited to 'reader/rewrite/rewriter_test.go')
-rw-r--r-- | reader/rewrite/rewriter_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/reader/rewrite/rewriter_test.go b/reader/rewrite/rewriter_test.go index fab7da26..8f8aeb0a 100644 --- a/reader/rewrite/rewriter_test.go +++ b/reader/rewrite/rewriter_test.go @@ -325,3 +325,13 @@ func TestRewriteBase64DecodeArgs(t *testing.T) { t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected) } } + +func TestRewriteRemoveTables(t *testing.T) { + content := `<table class="container"><tbody><tr><td><p>Test</p><table class="row"><tbody><tr><td>Hello World!</td></tr></tbody></table></td></tr></tbody></table>` + expected := `<p>Test</p>Hello World!` + output := Rewriter("https://example.org/article", content, `remove_tables`) + + if expected != output { + t.Errorf(`Not expected output: got "%s" instead of "%s"`, output, expected) + } +} |