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:
Toshi MARUYAMA
2020-10-22 14:17:20 +00:00
parent eab671320a
commit 0d2dd0669e

View File

@@ -44,9 +44,22 @@ class MenuManagerTest < Redmine::IntegrationTest
Setting.default_language = 'en'
assert_no_difference 'Redmine::MenuManager.items(:project_menu).size' do
Redmine::MenuManager.map :project_menu do |menu|
menu.push :foo, { :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
menu.push(
:foo,
{: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
get '/projects/ecookbook'