diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2011-09-11 01:38:55 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2011-09-13 01:02:44 -0500 |
commit | 9279d1102c7d96810813cad0d0a666db0a549b1f (patch) | |
tree | 6fffb2f33c98219fad857b242fe13ffb0333ef98 /actionpack/test | |
parent | a9509284cad9047693f8e5d74248ad307ab5b23d (diff) | |
download | rails-9279d1102c7d96810813cad0d0a666db0a549b1f.tar.gz rails-9279d1102c7d96810813cad0d0a666db0a549b1f.tar.bz2 rails-9279d1102c7d96810813cad0d0a666db0a549b1f.zip |
Set relative url root in assets when controller isn't available for Sprockets. Fix #2435
See https://github.com/rails/sass-rails/issues/42 for details
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index ae4cb1f0aa..105c641712 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -124,6 +124,13 @@ class SprocketsHelperTest < ActionView::TestCase asset_path("/images/logo.gif") end + test "asset path with relative url root when controller isn't present but relative_url_root is" do + @controller = nil + @config.action_controller.relative_url_root = "/collaboration/hieraki" + assert_equal "/collaboration/hieraki/images/logo.gif", + asset_path("/images/logo.gif") + end + test "javascript path" do assert_match %r{/assets/application-[0-9a-f]+.js}, asset_path(:application, "js") |