aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-16 06:04:23 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-16 06:04:23 +0000
commit89e06ed4c6191aff7769aeea8842f45df85acf89 (patch)
treee13b82847a3bff17afa1e43a0ce04a7c0d1e7353 /actionpack/test/template
parenta32303e0fcc1dd43de1d1e51442b542deaca8bf5 (diff)
downloadrails-89e06ed4c6191aff7769aeea8842f45df85acf89.tar.gz
rails-89e06ed4c6191aff7769aeea8842f45df85acf89.tar.bz2
rails-89e06ed4c6191aff7769aeea8842f45df85acf89.zip
Fixed image_tag so an exception is not thrown just because the image is missing and alt value can't be generated #1395 [Marcel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1434 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index f558bc1bbc..b1aa2565b7 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -166,16 +166,14 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
StyleLinkToTag.each { |method, tag| assert_equal(tag, eval(method)) }
end
- def test_image_tag
- assert_equal %(<img alt="Gold" height="70" src="/calloboration/hieraki/images/gold.png" width="45" />), image_tag("gold", :size => "45x70")
- end
-
def test_image_path
ImagePathToTag.each { |method, tag| assert_equal(tag, eval(method)) }
end
def test_image_tag
ImageLinkToTag.each { |method, tag| assert_equal(tag, eval(method)) }
+ # Assigning a default alt tag should not cause an exception to be raised
+ assert_nothing_raised { image_tag('') }
end
-end \ No newline at end of file
+end