From 5d45eed2ab9b029da5f6daac4a2834dec2c6bd3d Mon Sep 17 00:00:00 2001 From: Nishant Modak Date: Fri, 20 Nov 2015 18:17:23 +0530 Subject: Example of setting data attributes for image_tag --- actionview/test/template/asset_tag_helper_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'actionview/test/template/asset_tag_helper_test.rb') diff --git a/actionview/test/template/asset_tag_helper_test.rb b/actionview/test/template/asset_tag_helper_test.rb index a63ac442cd..fe40010528 100644 --- a/actionview/test/template/asset_tag_helper_test.rb +++ b/actionview/test/template/asset_tag_helper_test.rb @@ -193,7 +193,8 @@ class AssetTagHelperTest < ActionView::TestCase %(image_tag("//www.rubyonrails.com/images/rails.png")) => %(Rails), %(image_tag("mouse.png", :alt => nil)) => %(), %(image_tag("data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==", :alt => nil)) => %(), - %(image_tag("")) => %() + %(image_tag("")) => %(), + %(image_tag("gold.png", data: { title: 'Rails Application' })) => %(Gold) } FaviconLinkToTag = { -- cgit v1.2.3