From 5b0ada0f32ef23e757df3a266967d0367663f3f9 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 24 Nov 2019 05:44:29 +0000 Subject: [PATCH] cleanup: rubocop: fix Layout/IndentFirstArrayElement in test/helpers/activities_helper_test.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19240 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .rubocop_todo.yml | 1 - test/helpers/activities_helper_test.rb | 32 ++++++++++++++++---------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d24b0ad69..dfe198c92 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -156,7 +156,6 @@ Layout/IndentFirstArrayElement: - 'lib/redmine/wiki_formatting/textile/redcloth3.rb' - 'test/functional/auth_sources_controller_test.rb' - 'test/functional/repositories_mercurial_controller_test.rb' - - 'test/helpers/activities_helper_test.rb' - 'test/helpers/issues_helper_test.rb' - 'test/unit/issue_test.rb' - 'test/unit/lib/redmine/scm/adapters/git_adapter_test.rb' diff --git a/test/helpers/activities_helper_test.rb b/test/helpers/activities_helper_test.rb index 5d6f17b75..956390b71 100644 --- a/test/helpers/activities_helper_test.rb +++ b/test/helpers/activities_helper_test.rb @@ -48,12 +48,14 @@ class ActivitiesHelperTest < Redmine::HelperTest events << MockEvent.new events << MockEvent.new events << MockEvent.new - - assert_equal [ + assert_equal( + [ ['e2', false], ['e1', false], ['e0', false] - ], sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ], + sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ) end def test_sort_activity_events_should_group_events @@ -61,12 +63,14 @@ class ActivitiesHelperTest < Redmine::HelperTest events << MockEvent.new events << MockEvent.new(events[0]) events << MockEvent.new(events[0]) - - assert_equal [ + assert_equal( + [ ['e2', false], ['e1', true], ['e0', true] - ], sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ], + sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ) end def test_sort_activity_events_with_group_not_in_set_should_group_events @@ -74,11 +78,13 @@ class ActivitiesHelperTest < Redmine::HelperTest events = [] events << MockEvent.new(e) events << MockEvent.new(e) - - assert_equal [ + assert_equal( + [ ['e2', false], ['e1', true] - ], sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ], + sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ) end def test_sort_activity_events_should_sort_by_datetime_and_group @@ -90,8 +96,8 @@ class ActivitiesHelperTest < Redmine::HelperTest events << MockEvent.new(events[2]) events << MockEvent.new events << MockEvent.new(events[2]) - - assert_equal [ + assert_equal( + [ ['e6', false], ['e4', true], ['e2', true], @@ -99,6 +105,8 @@ class ActivitiesHelperTest < Redmine::HelperTest ['e3', false], ['e1', true], ['e0', false] - ], sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ], + sort_activity_events(events).map {|event, grouped| [event.name, grouped]} + ) end end -- 2.39.5