From 7240a960f2e515316ac4d962482f678b67b83b8c Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 17 Jun 2010 07:37:33 -0300 Subject: excerpt shoudn't return safe output test added [#4878] Signed-off-by: David Heinemeier Hansson --- actionpack/test/template/text_helper_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack') diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 1cd6a5941d..82c81ddf05 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -207,6 +207,10 @@ class TextHelperTest < ActionView::TestCase assert_nil excerpt("This is a beautiful morning", "day") end + def test_excerpt_should_not_be_html_safe + assert !excerpt('This is a beautiful! morning', 'beautiful', 5).html_safe? + end + def test_excerpt_in_borderline_cases assert_equal("", excerpt("", "", 0)) assert_equal("a", excerpt("a", "a", 0)) -- cgit v1.2.3