diff options
author | Jeff Kreeftmeijer <jeff@kreeftmeijer.nl> | 2010-10-11 20:39:12 +0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-11-02 19:38:28 -0200 |
commit | bb9c58eb4aa637fa75c69c705a9918d6322ff834 (patch) | |
tree | 1f6f113bdc943b1e96eb283f385383517d127aba /actionpack/test/template/capture_helper_test.rb | |
parent | d446392f76c063d9f04396a1d3ca9e314a521671 (diff) | |
download | rails-bb9c58eb4aa637fa75c69c705a9918d6322ff834.tar.gz rails-bb9c58eb4aa637fa75c69c705a9918d6322ff834.tar.bz2 rails-bb9c58eb4aa637fa75c69c705a9918d6322ff834.zip |
Make sure capture's output gets html_escaped [#5545 state:resolved]
Also remove a duplicate test_link_to_unless assertion and add .html_safe to the
remaining one.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test/template/capture_helper_test.rb')
-rw-r--r-- | actionpack/test/template/capture_helper_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/template/capture_helper_test.rb b/actionpack/test/template/capture_helper_test.rb index 8f81076299..25da17bde9 100644 --- a/actionpack/test/template/capture_helper_test.rb +++ b/actionpack/test/template/capture_helper_test.rb @@ -28,6 +28,11 @@ class CaptureHelperTest < ActionView::TestCase assert_nil @av.capture { 1 } end + def test_capture_escapes_html + string = @av.capture { '<strong>foo</strong><em>bar</em>' } + assert_equal '<strong>foo</strong><em>bar</em>', string + end + def test_content_for assert ! content_for?(:title) content_for :title, 'title' |