From 253bedfbe53454a45b090bf9c98fa4add347a905 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Wed, 13 Jan 2021 09:33:24 -0500 Subject: [PATCH] fix: update test to handle behavior of latest Nokogiri --- test/integration/test_ad_hoc.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/test_ad_hoc.rb b/test/integration/test_ad_hoc.rb index 4d5f0cb..dab1139 100644 --- a/test/integration/test_ad_hoc.rb +++ b/test/integration/test_ad_hoc.rb @@ -226,8 +226,7 @@ def test_dont_remove_whitespace_between_tags it "Loofah.document removes the comment" do sanitized = Loofah.document(html) - sanitized_html = sanitized.to_html - refute_match(/--/, sanitized_html) + refute(sanitized.children.any? { |node| node.comment? } ) end it "Loofah.scrub_document removes the comment" do