aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-06-17 07:37:33 -0300
committerDavid Heinemeier Hansson <david@loudthinking.com>2010-06-17 09:41:04 -0500
commit7240a960f2e515316ac4d962482f678b67b83b8c (patch)
tree9217fc478299fb52706f8c773df1c09afdf204fa /actionpack
parenta424808df95c5ebe66d02f0d743e741a1864baa7 (diff)
downloadrails-7240a960f2e515316ac4d962482f678b67b83b8c.tar.gz
rails-7240a960f2e515316ac4d962482f678b67b83b8c.tar.bz2
rails-7240a960f2e515316ac4d962482f678b67b83b8c.zip
excerpt shoudn't return safe output test added
[#4878] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/template/text_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
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))