aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-06-27 23:00:05 +0200
committerXavier Noria <fxn@hashref.com>2011-06-27 23:00:05 +0200
commita0960ec2d4476763d6975e3df6806cf99f24ead9 (patch)
tree379c8c3526163e63f82588f29f20ddbdc238b68c /actionpack/test/template/asset_tag_helper_test.rb
parentf63f0baa59356fcb68beed46d4d6a26248c6385c (diff)
downloadrails-a0960ec2d4476763d6975e3df6806cf99f24ead9.tar.gz
rails-a0960ec2d4476763d6975e3df6806cf99f24ead9.tar.bz2
rails-a0960ec2d4476763d6975e3df6806cf99f24ead9.zip
the generated ALT attribute for images no longer contains the digest, if any
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 2abc806e97..38ab5815a4 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -424,6 +424,14 @@ class AssetTagHelperTest < ActionView::TestCase
PathToImageToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) }
end
+ def test_image_alt
+ [nil, '/', '/foo/bar/', 'foo/bar/'].each do |prefix|
+ assert_equal 'Rails', image_alt("#{prefix}rails.png")
+ assert_equal 'Rails', image_alt("#{prefix}rails-9c0a079bdd7701d7e729bd956823d153.png")
+ assert_equal 'Avatar-0000', image_alt("#{prefix}avatar-0000.png")
+ end
+ end
+
def test_image_tag
ImageLinkToTag.each { |method, tag| assert_dom_equal(tag, eval(method)) }
end