From 0b001edbf6278a2ecc94545bee08448287492080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Tue, 17 Jun 2025 17:50:42 -0700 Subject: [PATCH] test(sanitizer): add test case to cover Vimeo iframe rewrite without query string --- internal/reader/sanitizer/sanitizer_test.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/internal/reader/sanitizer/sanitizer_test.go b/internal/reader/sanitizer/sanitizer_test.go index 76441042..53819bdf 100644 --- a/internal/reader/sanitizer/sanitizer_test.go +++ b/internal/reader/sanitizer/sanitizer_test.go @@ -818,13 +818,23 @@ func TestReplaceYoutubeURLWithCustomURL(t *testing.T) { } } -func TestReplaceIframeVimedoDNTURL(t *testing.T) { +func TestVimeoIframeRewriteWithQueryString(t *testing.T) { input := `` expected := `` output := SanitizeHTMLWithDefaultOptions("http://example.org/", input) if expected != output { - t.Errorf(`Wrong output: "%s" != "%s"`, expected, output) + t.Errorf(`Wrong output: %q != %q`, expected, output) + } +} + +func TestVimeoIframeRewriteWithoutQueryString(t *testing.T) { + input := `` + expected := `` + output := SanitizeHTMLWithDefaultOptions("http://example.org/", input) + + if expected != output { + t.Errorf(`Wrong output: %q != %q`, expected, output) } }