From 3c7215bdce30aaaa6b86f5ec905c981346e170eb Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 2 Nov 2010 20:02:55 -0200 Subject: Test that capture doesn't escape twice --- actionpack/test/template/capture_helper_test.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'actionpack/test/template') 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 { 'foobar' } - assert_equal '<strong>foo</strong><em>bar</em>', string + string = @av.capture { 'bar' } + 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 -- cgit v1.2.3