Restores support for :plugin support to stylesheet_link_tag and javascript_include_tag helpers.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9558 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-04-28 09:10:46 +00:00
parent f12942ff40
commit 03335d014c
5 changed files with 57 additions and 22 deletions

View File

@@ -1045,4 +1045,20 @@ RAW
User.current = User.find(4)
assert_include '<option value="4"><< me >></option>', principals_options_for_select(users)
end
def test_stylesheet_link_tag_should_pick_the_default_stylesheet
assert_match 'href="/stylesheets/styles.css"', stylesheet_link_tag("styles")
end
def test_stylesheet_link_tag_for_plugin_should_pick_the_plugin_stylesheet
assert_match 'href="/plugin_assets/foo/stylesheets/styles.css"', stylesheet_link_tag("styles", :plugin => :foo)
end
def test_javascript_include_tag_should_pick_the_default_javascript
assert_match 'src="/javascripts/scripts.js"', javascript_include_tag("scripts")
end
def test_javascript_include_tag_for_plugin_should_pick_the_plugin_javascript
assert_match 'src="/plugin_assets/foo/javascripts/scripts.js"', javascript_include_tag("scripts", :plugin => :foo)
end
end