diff options
author | docunext <albert.lash@docunext.com> | 2011-09-21 13:19:48 -0400 |
---|---|---|
committer | docunext <albert.lash@docunext.com> | 2011-09-22 13:43:08 -0400 |
commit | c070cc4ab41fd848fc72f19e7f99d75b1e1fd097 (patch) | |
tree | 85bbb52783bc019b6aede112e69758b52a673cc8 /actionpack/test | |
parent | caa95ab6d826f4bb112c2911849ce03c7312af11 (diff) | |
download | rails-c070cc4ab41fd848fc72f19e7f99d75b1e1fd097.tar.gz rails-c070cc4ab41fd848fc72f19e7f99d75b1e1fd097.tar.bz2 rails-c070cc4ab41fd848fc72f19e7f99d75b1e1fd097.zip |
Fixes #1489 again, with updated code and numerous tests to confirm
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index c0fb07a29b..a44a16750f 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -47,6 +47,16 @@ class SprocketsHelperTest < ActionView::TestCase asset_path("logo.png", :digest => false) end + test "custom_asset_path" do + @config.assets.prefix = '/s' + assert_match %r{/s/logo-[0-9a-f]+.png}, + asset_path("logo.png") + assert_match %r{/s/logo-[0-9a-f]+.png}, + asset_path("logo.png", :digest => true) + assert_match %r{/s/logo.png}, + asset_path("logo.png", :digest => false) + end + test "asset_path with root relative assets" do assert_equal "/images/logo", asset_path("/images/logo") |