aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/asset_tag_helper_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/template/asset_tag_helper_test.rb b/actionpack/test/template/asset_tag_helper_test.rb
index 5393e30724..33705b8e7c 100644
--- a/actionpack/test/template/asset_tag_helper_test.rb
+++ b/actionpack/test/template/asset_tag_helper_test.rb
@@ -189,6 +189,10 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
def relative_url_root
"/collaboration/hieraki"
end
+
+ def protocol
+ 'gopher://'
+ end
end.new
@controller.request = @request
@@ -230,4 +234,11 @@ class AssetTagHelperNonVhostTest < Test::Unit::TestCase
ensure
ActionController::Base.asset_host = nil
end
+
+ def test_asset_host_without_protocol_should_use_request_protocol
+ ActionController::Base.asset_host = 'a.example.com'
+ assert_equal 'gopher://a.example.com/collaboration/hieraki/images/xml.png', image_path('xml.png')
+ ensure
+ ActionController::Base.asset_host = nil
+ end
end