aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-09-25 07:15:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-09-25 07:15:52 +0900
commit3ab5f475e0014f2d449bf3f26cac429bdd5f0069 (patch)
treeae5e71e4fe39b09863f0a2cff948d58ad8fb9600 /actionview
parent0c4dc1639c692c3b4a7444409baf150bc42b717f (diff)
downloadrails-3ab5f475e0014f2d449bf3f26cac429bdd5f0069.tar.gz
rails-3ab5f475e0014f2d449bf3f26cac429bdd5f0069.tar.bz2
rails-3ab5f475e0014f2d449bf3f26cac429bdd5f0069.zip
Fix `test_should_sanitize_illegal_style_properties` failure
https://travis-ci.org/rails/rails/jobs/279300966#L2600 The result of `Loofah::HTML5::Scrub.scrub_css` was changed since v2.1.0.rc1. https://github.com/flavorjones/loofah/commit/ca56295ff9e802018ea18d23ed49be235a95ccad
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/template/sanitize_helper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/test/template/sanitize_helper_test.rb b/actionview/test/template/sanitize_helper_test.rb
index c7714cf205..0e690c82cb 100644
--- a/actionview/test/template/sanitize_helper_test.rb
+++ b/actionview/test/template/sanitize_helper_test.rb
@@ -21,8 +21,8 @@ class SanitizeHelperTest < ActionView::TestCase
def test_should_sanitize_illegal_style_properties
raw = %(display:block; position:absolute; left:0; top:0; width:100%; height:100%; z-index:1; background-color:black; background-image:url(http://www.ragingplatypus.com/i/cam-full.jpg); background-x:center; background-y:center; background-repeat:repeat;)
- expected = %(display: block; width: 100%; height: 100%; background-color: black; background-x: center; background-y: center;)
- assert_equal expected, sanitize_css(raw)
+ expected = %r(\Adisplay:\s?block;\s?width:\s?100%;\s?height:\s?100%;\s?background-color:\s?black;\s?background-x:\s?center;\s?background-y:\s?center;\z)
+ assert_match expected, sanitize_css(raw)
end
def test_strip_tags