diff options
author | Christos Zisopoulos <christos@me.com> | 2011-09-26 18:45:49 +0200 |
---|---|---|
committer | Christos Zisopoulos <christos@me.com> | 2011-09-26 18:45:49 +0200 |
commit | b8ea31540a7f3b195a211457a73de7a22b30059b (patch) | |
tree | 9e1ddb9dd8b298153eabe6f3c8ea2dac96fcbcea /actionpack/test | |
parent | 89e98e278abe8564b80953855fcb4bcb9871c51c (diff) | |
download | rails-b8ea31540a7f3b195a211457a73de7a22b30059b.tar.gz rails-b8ea31540a7f3b195a211457a73de7a22b30059b.tar.bz2 rails-b8ea31540a7f3b195a211457a73de7a22b30059b.zip |
Correctly override image_path in sprockets rails_helper
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/sprockets_helper_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/template/sprockets_helper_test.rb b/actionpack/test/template/sprockets_helper_test.rb index ad57bbd96c..b1e6db7b34 100644 --- a/actionpack/test/template/sprockets_helper_test.rb +++ b/actionpack/test/template/sprockets_helper_test.rb @@ -126,6 +126,14 @@ class SprocketsHelperTest < ActionView::TestCase assert_dom_equal '<img alt="Xml" src="/assets/xml.png" />', image_tag("xml.png") end + test "image_path" do + assert_match %r{/assets/logo-[0-9a-f]+.png}, + image_path("logo.png") + + assert_match %r{/assets/logo-[0-9a-f]+.png}, + path_to_image("logo.png") + end + test "stylesheets served without a controller in do not use asset hosts when the default protocol is :request" do @controller = nil @config.action_controller.asset_host = "assets-%d.example.com" |