diff options
Diffstat (limited to 'test/helpers/activities_helper_test.rb')
-rw-r--r-- | test/helpers/activities_helper_test.rb | 32 |
1 files changed, 20 insertions, 12 deletions
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 |