Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

excerpt shoudn't return safe output test added

[#4878]

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
  • Loading branch information...
commit 7240a960f2e515316ac4d962482f678b67b83b8c 1 parent a424808
@spastorino spastorino authored dhh committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/test/template/text_helper_test.rb
View
4 actionpack/test/template/text_helper_test.rb
@@ -207,6 +207,10 @@ def test_excerpt
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))
Please sign in to comment.
Something went wrong with that request. Please try again.