diff options
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r-- | actionpack/test/template/asset_tag_helper_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb index 43d11df8fe..fbd504ae7d 100644 --- a/actionpack/test/template/asset_tag_helper_test.rb +++ b/actionpack/test/template/asset_tag_helper_test.rb @@ -373,8 +373,15 @@ class AssetTagHelperTest < ActionView::TestCase assert_equal %(<img alt="Rails" src="/images/rails.png?#{expected_time}" />), image_tag("rails.png") end + def test_string_asset_id + @controller.config.asset_path = "/assets.v12345%s" + + expected_path = "/assets.v12345/images/rails.png" + assert_equal %(<img alt="Rails" src="#{expected_path}" />), image_tag("rails.png") + end + def test_proc_asset_id - @controller.config.asset_path_template = Proc.new do |asset_path| + @controller.config.asset_path = Proc.new do |asset_path| "/assets.v12345#{asset_path}" end |