summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-13 12:39:54 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-13 12:39:54 +0000
commitf146227c3a60a407b58f307a29cb035800297f08 (patch)
tree82455e677168eccab46b88d29f9a9165cbc1f243
parentf317b818d64ca05b74bd2836ad3d1c00f666a4a5 (diff)
downloadredmine-f146227c3a60a407b58f307a29cb035800297f08.tar.gz
redmine-f146227c3a60a407b58f307a29cb035800297f08.zip
shorten long line of test/unit/lib/redmine/menu_manager/menu_item_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20354 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/unit/lib/redmine/menu_manager/menu_item_test.rb56
1 files changed, 29 insertions, 27 deletions
diff --git a/test/unit/lib/redmine/menu_manager/menu_item_test.rb b/test/unit/lib/redmine/menu_manager/menu_item_test.rb
index b403c8436..80e0674cc 100644
--- a/test/unit/lib/redmine/menu_manager/menu_item_test.rb
+++ b/test/unit/lib/redmine/menu_manager/menu_item_test.rb
@@ -54,49 +54,51 @@ class Redmine::MenuManager::MenuItemTest < ActiveSupport::TestCase
def test_new_menu_item_should_require_a_proc_to_use_for_the_if_condition
assert_raises ArgumentError do
- Redmine::MenuManager::MenuItem.new(:test_error, '/test',
- {
- :if => ['not_a_proc']
- })
+ Redmine::MenuManager::MenuItem.new(
+ :test_error, '/test', {:if => ['not_a_proc']}
+ )
end
- assert Redmine::MenuManager::MenuItem.new(:test_good_if, '/test',
- {
- :if => Proc.new{}
- })
+ assert(
+ Redmine::MenuManager::MenuItem.new(
+ :test_good_if, '/test', {:if => Proc.new{}}
+ )
+ )
end
def test_new_menu_item_should_allow_a_hash_for_extra_html_options
assert_raises ArgumentError do
- Redmine::MenuManager::MenuItem.new(:test_error, '/test',
- {
- :html => ['not_a_hash']
- })
+ Redmine::MenuManager::MenuItem.new(
+ :test_error, '/test',
+ {:html => ['not_a_hash']}
+ )
end
-
- assert Redmine::MenuManager::MenuItem.new(:test_good_html, '/test',
- {
- :html => { :onclick => 'doSomething'}
- })
+ assert(
+ Redmine::MenuManager::MenuItem.new(
+ :test_good_html, '/test',
+ {:html => {:onclick => 'doSomething'}}
+ )
+ )
end
def test_new_menu_item_should_require_a_proc_to_use_the_children_option
assert_raises ArgumentError do
- Redmine::MenuManager::MenuItem.new(:test_error, '/test',
- {
- :children => ['not_a_proc']
- })
+ Redmine::MenuManager::MenuItem.new(
+ :test_error, '/test', {:children => ['not_a_proc']}
+ )
end
-
- assert Redmine::MenuManager::MenuItem.new(:test_good_children, '/test',
- {
- :children => Proc.new{}
- })
+ assert(
+ Redmine::MenuManager::MenuItem.new(
+ :test_good_children, '/test', {:children => Proc.new{}}
+ )
+ )
end
def test_new_should_not_allow_setting_the_parent_item_to_the_current_item
assert_raises ArgumentError do
- Redmine::MenuManager::MenuItem.new(:test_error, '/test', { :parent => :test_error })
+ Redmine::MenuManager::MenuItem.new(
+ :test_error, '/test', {:parent => :test_error}
+ )
end
end