diff options
author | wycats <wycats@gmail.com> | 2010-03-28 18:45:52 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-28 18:46:18 -0700 |
commit | 201e8986b15f4d815355e0ca96e02cf16dba9372 (patch) | |
tree | 4160f1a01034b520c0968b16557b50c220ae0c86 /actionpack/test/template | |
parent | 49bc6a249e2a200216f8a96c36093a2c7a471c9b (diff) | |
download | rails-201e8986b15f4d815355e0ca96e02cf16dba9372.tar.gz rails-201e8986b15f4d815355e0ca96e02cf16dba9372.tar.bz2 rails-201e8986b15f4d815355e0ca96e02cf16dba9372.zip |
Updated asset_template_path to asset_path and have it also support a String [#4247 state:resolved]
Diffstat (limited to 'actionpack/test/template')
-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 |