From 43efae22a7a59d5fe0be599bd074c5e7d881266a Mon Sep 17 00:00:00 2001 From: Roberto Miranda Date: Sat, 3 Jun 2017 11:30:01 -0500 Subject: Add `srcset` option to `image_tag` helper --- actionview/test/template/asset_tag_helper_test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'actionview/test/template') diff --git a/actionview/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb index 6093a4e660..d1190b1bd7 100644 --- a/actionview/test/template/asset_tag_helper_test.rb +++ b/actionview/test/template/asset_tag_helper_test.rb @@ -197,7 +197,10 @@ class AssetTagHelperTest < ActionView::TestCase %(image_tag("mouse.png", :alt => nil)) => %(), %(image_tag("data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==", :alt => nil)) => %(), %(image_tag("")) => %(), - %(image_tag("gold.png", data: { title: 'Rails Application' })) => %(Gold) + %(image_tag("gold.png", data: { title: 'Rails Application' })) => %(Gold), + %(image_tag("rss.gif", srcset: "/assets/pic_640.jpg 640w, /assets/pic_1024.jpg 1024w")) => %(Rss), + %(image_tag("rss.gif", srcset: { "pic_640.jpg" => "640w", "pic_1024.jpg" => "1024w" })) => %(Rss), + %(image_tag("rss.gif", srcset: [["pic_640.jpg", "640w"], ["pic_1024.jpg", "1024w"]])) => %(Rss) } FaviconLinkToTag = { -- cgit v1.2.3