mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make sure image_alt is deprecated
This commit is contained in:
parent
85f8fc2246
commit
a87e9d516d
1 changed files with 15 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue