From 03335d014ceb42d8db670606e3960b5fd84cb7c3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 28 Apr 2012 09:10:46 +0000 Subject: 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 --- test/unit/helpers/application_helper_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') 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 '', 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 -- cgit v1.2.3