summaryrefslogtreecommitdiffstats
path: root/rubygem-rails-html-sanitizer-1.0.1-Fix-false-possitive-test.patch
blob: 1e0f425163b5f13aca9aa57cdf40e68defeb5ee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 643009712ca5f82639519c9617606f3fdb744b63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?=
 <rafael.franca@plataformatec.com.br>
Date: Thu, 25 Sep 2014 16:38:51 -0300
Subject: [PATCH] Fix false possitive test

This test was passing because the assert_dom_equal was only comparing
the top level tag.

This bug was fixed at
https://github.com/rails/rails-dom-testing/commit/c06500ce4185aed04b40806feff6e123d741f235
and released as rails-dom-testing 1.0.3
---
 test/sanitizer_test.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/sanitizer_test.rb b/test/sanitizer_test.rb
index 5d6ad02..d1ab2aa 100644
--- a/test/sanitizer_test.rb
+++ b/test/sanitizer_test.rb
@@ -173,7 +173,7 @@ def test_sanitize_image_src
   end
 
   def test_should_allow_anchors
-    assert_sanitized %(<a href="foo" onclick="bar"><script>baz</script></a>), %(<a href=\"foo\">baz</a>)
+    assert_sanitized %(<a href="foo" onclick="bar"><script>baz</script></a>), %(<a href=\"foo\"></a>)
   end
 
   def test_video_poster_sanitization