mirror of
https://github.com/redmine/redmine.git
synced 2025-11-10 07:16:03 +01:00
shorten long line of test/integration/lib/redmine/menu_manager_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20156 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -44,9 +44,22 @@ class MenuManagerTest < Redmine::IntegrationTest
|
|||||||
Setting.default_language = 'en'
|
Setting.default_language = 'en'
|
||||||
assert_no_difference 'Redmine::MenuManager.items(:project_menu).size' do
|
assert_no_difference 'Redmine::MenuManager.items(:project_menu).size' do
|
||||||
Redmine::MenuManager.map :project_menu do |menu|
|
Redmine::MenuManager.map :project_menu do |menu|
|
||||||
menu.push :foo, { :controller => 'projects', :action => 'show' }, :caption => 'Foo'
|
menu.push(
|
||||||
menu.push :bar, { :controller => 'projects', :action => 'show' }, :before => :activity
|
:foo,
|
||||||
menu.push :hello, { :controller => 'projects', :action => 'show' }, :caption => Proc.new {|p| p.name.upcase }, :after => :bar
|
{:controller => 'projects', :action => 'show'},
|
||||||
|
:caption => 'Foo'
|
||||||
|
)
|
||||||
|
menu.push(
|
||||||
|
:bar,
|
||||||
|
{:controller => 'projects', :action => 'show'},
|
||||||
|
:before => :activity
|
||||||
|
)
|
||||||
|
menu.push(
|
||||||
|
:hello,
|
||||||
|
{:controller => 'projects', :action => 'show'},
|
||||||
|
:caption => Proc.new {|p| p.name.upcase},
|
||||||
|
:after => :bar
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/projects/ecookbook'
|
get '/projects/ecookbook'
|
||||||
|
|||||||
Reference in New Issue
Block a user