mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 19:05:51 +01:00
Fixed that sidebar with hook content only should not be hidden.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9598 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -520,23 +520,4 @@ class ProjectsControllerTest < ActionController::TestCase
|
||||
assert_response :success
|
||||
assert_template 'show'
|
||||
end
|
||||
|
||||
# A hook that is manually registered later
|
||||
class ProjectBasedTemplate < Redmine::Hook::ViewListener
|
||||
def view_layouts_base_html_head(context)
|
||||
# Adds a project stylesheet
|
||||
stylesheet_link_tag(context[:project].identifier) if context[:project]
|
||||
end
|
||||
end
|
||||
# Don't use this hook now
|
||||
Redmine::Hook.clear_listeners
|
||||
|
||||
def test_hook_response
|
||||
Redmine::Hook.add_listener(ProjectBasedTemplate)
|
||||
get :show, :id => 1
|
||||
assert_tag :tag => 'link', :attributes => {:href => '/stylesheets/ecookbook.css'},
|
||||
:parent => {:tag => 'head'}
|
||||
|
||||
Redmine::Hook.clear_listeners
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user