aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-09-12 23:25:28 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-09-12 23:25:28 -0700
commitb0cee703547a12adeb0fe43e121ad2da8c73422a (patch)
treec43c5e18e489a94abad497236e436c707b77213e /actionpack/test
parent038e45a2b6a71175ffe368ae9d7c920f7d1230a6 (diff)
parent9279d1102c7d96810813cad0d0a666db0a549b1f (diff)
downloadrails-b0cee703547a12adeb0fe43e121ad2da8c73422a.tar.gz
rails-b0cee703547a12adeb0fe43e121ad2da8c73422a.tar.bz2
rails-b0cee703547a12adeb0fe43e121ad2da8c73422a.zip
Merge pull request #2977 from guilleiguaran/fix-relative-root-in-assets
Set relative url root in assets when controller isn't available for Sprockets
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/sprockets_helper_test.rb7
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")