Test that capture doesn't escape twice
This commit is contained in:
parent
72d12d9455
commit
3c7215bdce
@ -29,8 +29,13 @@ def test_capture_returns_nil_if_the_returned_value_is_not_a_string
|
||||
end
|
||||
|
||||
def test_capture_escapes_html
|
||||
string = @av.capture { '<strong>foo</strong><em>bar</em>' }
|
||||
assert_equal '<strong>foo</strong><em>bar</em>', string
|
||||
string = @av.capture { '<em>bar</em>' }
|
||||
assert_equal '<em>bar</em>', string
|
||||
end
|
||||
|
||||
def test_capture_doesnt_escape_twice
|
||||
string = @av.capture { '<em>bar</em>'.html_safe }
|
||||
assert_equal '<em>bar</em>', string
|
||||
end
|
||||
|
||||
def test_content_for
|
||||
|
Loading…
Reference in New Issue
Block a user