diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-28 09:47:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-28 09:47:09 +0000 |
commit | 68f8470d4af60c71d024059b96ad53f2968b1bf2 (patch) | |
tree | 37bdf896dda10271df9172636e9961ebaa858572 /test/unit | |
parent | da43f785bea5ef7f8cc985358e8204ad0e0c7fdc (diff) | |
download | redmine-68f8470d4af60c71d024059b96ad53f2968b1bf2.tar.gz redmine-68f8470d4af60c71d024059b96ad53f2968b1bf2.zip |
Makes image_tag pick the image from the current theme if it exists.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9560 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/helpers/application_helper_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index 9bf25e605..6dea2cf57 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -1058,6 +1058,18 @@ RAW assert_match 'src="/images/image.png"', image_tag("image.png") end + def test_image_tag_should_pick_the_theme_image_if_it_exists + theme = Redmine::Themes.themes.last + theme.images << 'image.png' + + with_settings :ui_theme => theme.id do + assert_match %|src="/themes/#{theme.dir}/images/image.png"|, image_tag("image.png") + assert_match %|src="/images/other.png"|, image_tag("other.png") + end + ensure + theme.images.delete 'image.png' + end + def test_image_tag_sfor_plugin_should_pick_the_plugin_image assert_match 'src="/plugin_assets/foo/images/image.png"', image_tag("image.png", :plugin => :foo) end |