Fix ActionView tests

Reverts some of the changes from #23242.
This commit is contained in:
Jon Moss 2016-01-27 10:57:37 -05:00 committed by Rafael Mendonça França
parent fb7b36e655
commit 00545f3221
1 changed files with 3 additions and 3 deletions

View File

@ -44,11 +44,11 @@ class TextHelperTest < ActionView::TestCase
end
def test_simple_format_should_sanitize_input_when_sanitize_option_is_not_false
assert_equal "<p><b> test with unsafe string </b>code!</p>", simple_format("<b> test with unsafe string </b><script>code!</script>")
assert_equal "<p><b> test with unsafe string </b></p>", simple_format("<b> test with unsafe string </b><script>code!</script>")
end
def test_simple_format_should_sanitize_input_when_sanitize_option_is_true
assert_equal '<p><b> test with unsafe string </b>code!</p>',
assert_equal '<p><b> test with unsafe string </b></p>',
simple_format('<b> test with unsafe string </b><script>code!</script>', {}, sanitize: true)
end
@ -193,7 +193,7 @@ class TextHelperTest < ActionView::TestCase
def test_highlight_should_sanitize_input
assert_equal(
"This is a <mark>beautiful</mark> morningcode!",
"This is a <mark>beautiful</mark> morning",
highlight("This is a beautiful morning<script>code!</script>", "beautiful")
)
end