summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-28 09:10:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-28 09:10:46 +0000
commit03335d014ceb42d8db670606e3960b5fd84cb7c3 (patch)
tree0ce368dfb2f336ada99dac6db73b8f17c73c875b /test
parentf12942ff400878a407c3523e295fe0dbc65760b0 (diff)
downloadredmine-03335d014ceb42d8db670606e3960b5fd84cb7c3.tar.gz
redmine-03335d014ceb42d8db670606e3960b5fd84cb7c3.zip
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
Diffstat (limited to 'test')
-rw-r--r--test/unit/helpers/application_helper_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb
index a7a05f3e0..f09d66646 100644
--- a/test/unit/helpers/application_helper_test.rb
+++ b/test/unit/helpers/application_helper_test.rb
@@ -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