diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 07:32:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 07:32:25 +0000 |
commit | d347fd4d39ff7617e26b676505de16a552cb2cdd (patch) | |
tree | add91314e04a90f6b83d926f643967857a77fc43 /test/unit | |
parent | a3286e364a31d56d7b9a7b0bf94c3300b2a5aa8a (diff) | |
download | redmine-d347fd4d39ff7617e26b676505de16a552cb2cdd.tar.gz redmine-d347fd4d39ff7617e26b676505de16a552cb2cdd.zip |
link_to in Redmine::Hook::ViewListener omits relative url root (#19024).
git-svn-id: http://svn.redmine.org/redmine/trunk@13960 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/lib/redmine/hook_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/hook_test.rb b/test/unit/lib/redmine/hook_test.rb index 5093abaa6..109abc888 100644 --- a/test/unit/lib/redmine/hook_test.rb +++ b/test/unit/lib/redmine/hook_test.rb @@ -114,6 +114,15 @@ class Redmine::Hook::ManagerTest < ActionView::TestCase assert_equal ['<a href="/issues">Issues</a>'], hook_helper.call_hook(:view_layouts_base_html_head) end + def test_view_hook_should_generate_links_with_relative_url_root + Redmine::Utils.relative_url_root = '/foo' + @hook_module.add_listener(TestLinkToHook) + + assert_equal ['<a href="/foo/issues">Issues</a>'], hook_helper.call_hook(:view_layouts_base_html_head) + ensure + Redmine::Utils.relative_url_root = '' + end + # Context: Redmine::Hook::Helper.call_hook def test_call_hook_with_project_added_to_context @hook_module.add_listener(TestHook3) |