diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-17 07:37:33 -0300 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-06-17 09:41:04 -0500 |
commit | 7240a960f2e515316ac4d962482f678b67b83b8c (patch) | |
tree | 9217fc478299fb52706f8c773df1c09afdf204fa | |
parent | a424808df95c5ebe66d02f0d743e741a1864baa7 (diff) | |
download | rails-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>
-rw-r--r-- | actionpack/test/template/text_helper_test.rb | 4 |
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)) |