diff options
author | Timm <kaspth@gmail.com> | 2013-07-10 16:38:56 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-15 23:39:15 +0200 |
commit | 4f6739887fb89af25b354b971c145a2316372fa1 (patch) | |
tree | 4d4939688cf45d019faa5f48510070af5c73acad /actionview/test | |
parent | c80da233103acc3fdb80974864f8df477bb43d3b (diff) | |
download | rails-4f6739887fb89af25b354b971c145a2316372fa1.tar.gz rails-4f6739887fb89af25b354b971c145a2316372fa1.tar.bz2 rails-4f6739887fb89af25b354b971c145a2316372fa1.zip |
Changed the description of some pending tests. Changed the expected output of a script test.
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/sanitizers_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actionview/test/template/sanitizers_test.rb b/actionview/test/template/sanitizers_test.rb index fa94f7e621..c530da2996 100644 --- a/actionview/test/template/sanitizers_test.rb +++ b/actionview/test/template/sanitizers_test.rb @@ -27,8 +27,8 @@ class SanitizersTest < ActionController::TestCase # Actual: "Weia onclick='alert(document.cookie);'/>rdos" assert_equal("Weirdos", sanitizer.sanitize("Wei<<a>a onclick='alert(document.cookie);'</a>/>rdos")) - # Loofah strips newlines. Leaves comment text. - # Actual: "This is a test. it has a comment It no longer contains any HTML." + # Loofah strips newlines. + # Actual: "This is a test.It no longer contains any HTML." assert_equal( %{This is a test.\n\n\nIt no longer contains any HTML.\n}, sanitizer.sanitize( %{<title>This is <b>a <a href="" target="_blank">test</a></b>.</title>\n\n<!-- it has a comment -->\n\n<p>It no <b>longer <strong>contains <em>any <strike>HTML</strike></em>.</strong></b></p>\n})) @@ -57,6 +57,7 @@ class SanitizersTest < ActionController::TestCase assert_equal("This is a test.", sanitizer.sanitize("This is a test.")) + assert_equal "This has a here.", sanitizer.sanitize("This has a <!-- comment --> here.") assert_nothing_raised { sanitizer.sanitize("This is a frozen string with no tags".freeze) } end @@ -94,7 +95,7 @@ class SanitizersTest < ActionController::TestCase end def test_sanitize_script - assert_sanitized "a b c<script language=\"Javascript\">blah blah blah</script>d e f", "a b cblah blah blahd e f" + assert_sanitized "a b c<script language=\"Javascript\">blah blah blah</script>d e f", "a b cd e f" end def test_sanitize_js_handlers |