aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/asset_tag_helper_test.rb')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index cd4b56a2a0..65b0d368d8 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -364,4 +364,11 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
ensure
ActionController::Base.asset_host = nil
end
+
+ def test_asset_host_without_protocol_should_use_request_protocol_even_if_path_present
+ ActionController::Base.asset_host = 'a.example.com/files/go/here'
+ assert_equal 'gopher://a.example.com/files/go/here/collaboration/hieraki/images/xml.png', image_path('xml.png')
+ ensure
+ ActionController::Base.asset_host = nil
+ end
end