From db5adf2d42d16859cde8f40e7b0b7fb41167cff4 Mon Sep 17 00:00:00 2001 From: jacott Date: Sat, 28 May 2011 18:19:11 +1200 Subject: fixed asset_paths when called from sprockets for relative_url_root --- actionpack/test/template/sprockets_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index b26315083c..c2ee7f9582 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -57,6 +57,12 @@ class SprocketsHelperTest < ActionView::TestCase asset_path("http://www.example.com/video/play.mp4") end + test "asset path with relavtive url root" do + @controller.config.relative_url_root = "/collaboration/hieraki" + assert_equal "/collaboration/hieraki/images/logo.gif", + asset_path("/images/logo.gif") + end + test "javascript path" do assert_equal "/assets/application-d41d8cd98f00b204e9800998ecf8427e.js", asset_path(:application, "js") -- cgit v1.2.3