diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-11-02 20:02:55 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-11-02 20:02:55 -0200 |
commit | 3c7215bdce30aaaa6b86f5ec905c981346e170eb (patch) | |
tree | ce1921f8e77aea37a2921c003ae3646ad965210f /actionpack/test | |
parent | 72d12d94559f7c124fa2ec88eb668ad2948c02f4 (diff) | |
download | rails-3c7215bdce30aaaa6b86f5ec905c981346e170eb.tar.gz rails-3c7215bdce30aaaa6b86f5ec905c981346e170eb.tar.bz2 rails-3c7215bdce30aaaa6b86f5ec905c981346e170eb.zip |
Test that capture doesn't escape twice
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/capture_helper_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/test/template/capture_helper_test.rb b/actionpack/test/template/capture_helper_test.rb index 25da17bde9..03050485fa 100644 --- a/actionpack/test/template/capture_helper_test.rb +++ b/actionpack/test/template/capture_helper_test.rb @@ -29,8 +29,13 @@ class CaptureHelperTest < ActionView::TestCase 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 |