@@ -39,9 +39,9 | |||
|
39 | 39 | <%= link_to l(:label_settings), :controller => 'settings' %> |
|
40 | 40 | </p> |
|
41 | 41 | |
|
42 |
<% menu_items_for(:admin_menu) do |item |
|
|
43 |
<%= content_tag 'p', |
|
|
44 | link_to(h(caption), item.url, item.html_options), | |
|
42 | <% menu_items_for(:admin_menu) do |item| -%> | |
|
43 | <%= content_tag 'p', | |
|
44 | link_to(h(item.caption), item.url, item.html_options), | |
|
45 | 45 | :class => ["icon22", "icon22-#{item.name}"].join(' ') %> |
|
46 | 46 | <% end -%> |
|
47 | 47 |
@@ -120,6 +120,21 class AdminControllerTest < ActionController::TestCase | |||
|
120 | 120 | assert_template 'info' |
|
121 | 121 | end |
|
122 | 122 | |
|
123 | def test_admin_menu_plugin_extension | |
|
124 | Redmine::MenuManager.map :admin_menu do |menu| | |
|
125 | menu.push :test_admin_menu_plugin_extension, '/foo/bar', :caption => 'Test' | |
|
126 | end | |
|
127 | ||
|
128 | get :index | |
|
129 | assert_response :success | |
|
130 | assert_tag :a, :attributes => { :href => '/foo/bar' }, | |
|
131 | :content => 'Test' | |
|
132 | ||
|
133 | Redmine::MenuManager.map :admin_menu do |menu| | |
|
134 | menu.delete :test_admin_menu_plugin_extension | |
|
135 | end | |
|
136 | end | |
|
137 | ||
|
123 | 138 | private |
|
124 | 139 | |
|
125 | 140 | def delete_configuration_data |
General Comments 0
You need to be logged in to leave comments.
Login now