aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-03 16:47:05 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-03 16:47:05 +0000
commit6d17ece9f2558fe6d64a97d0b99493e4de2d32eb (patch)
tree65cdc242bf914650329032553d056090615a5d5c /actionpack/test/template
parentdb9be587196b2fdebacaecf54efe70940b006989 (diff)
downloadrails-6d17ece9f2558fe6d64a97d0b99493e4de2d32eb.tar.gz
rails-6d17ece9f2558fe6d64a97d0b99493e4de2d32eb.tar.bz2
rails-6d17ece9f2558fe6d64a97d0b99493e4de2d32eb.zip
strip_tags returns nil for a blank arg such as nil or "". Closes #2229.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/text_helper_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 7cc92e0bd6..6eda59affe 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -314,7 +314,7 @@ class TextHelperTest < Test::Unit::TestCase
assert_equal(
%{This is a test.\n\n\nIt no longer contains any HTML.\n}, strip_tags(
%{<title>This is <b>a <a href="" target="_blank">test</a></b>.</title>\n\n<!-- it has a comment -->\n\n<p>It no <b>longer <strong>contains <em>any <strike>HTML</strike></em>.</strong></b></p>\n}))
- assert_equal("This has a here.", strip_tags("This has a <!-- comment --> here."))
+ assert_equal "This has a here.", strip_tags("This has a <!-- comment --> here.")
+ [nil, '', ' '].each { |blank| assert_nil strip_tags(blank) }
end
-
end