diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-23 11:57:36 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-23 11:57:36 -0400 |
commit | a87e9d516dbe834379e038d408f8e07d8ed4e585 (patch) | |
tree | fbfae21b7ff76c95ce2adc8cc8f5becb9e32c1e0 /actionview/test/template | |
parent | 85f8fc2246eed2599fb0876ab78f5cf7bcda829c (diff) | |
download | rails-a87e9d516dbe834379e038d408f8e07d8ed4e585.tar.gz rails-a87e9d516dbe834379e038d408f8e07d8ed4e585.tar.bz2 rails-a87e9d516dbe834379e038d408f8e07d8ed4e585.zip |
Make sure image_alt is deprecated
Diffstat (limited to 'actionview/test/template')
-rw-r--r-- | actionview/test/template/asset_tag_helper_test.rb | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/actionview/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb index d5d4925f54..6645839f0e 100644 --- a/actionview/test/template/asset_tag_helper_test.rb +++ b/actionview/test/template/asset_tag_helper_test.rb @@ -463,11 +463,21 @@ class AssetTagHelperTest < ActionView::TestCase 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 "Rails", image_alt("#{prefix}rails-f56ef62bc41b040664e801a38f068082a75d506d9048307e8096737463503d0b.png") - assert_equal "Long file name with hyphens", image_alt("#{prefix}long-file-name-with-hyphens.png") - assert_equal "Long file name with underscores", image_alt("#{prefix}long_file_name_with_underscores.png") + assert_deprecated do + assert_equal "Rails", image_alt("#{prefix}rails.png") + end + assert_deprecated do + assert_equal "Rails", image_alt("#{prefix}rails-9c0a079bdd7701d7e729bd956823d153.png") + end + assert_deprecated do + assert_equal "Rails", image_alt("#{prefix}rails-f56ef62bc41b040664e801a38f068082a75d506d9048307e8096737463503d0b.png") + end + assert_deprecated do + assert_equal "Long file name with hyphens", image_alt("#{prefix}long-file-name-with-hyphens.png") + end + assert_deprecated do + assert_equal "Long file name with underscores", image_alt("#{prefix}long_file_name_with_underscores.png") + end end end |