File tree 2 files changed +7
-7
lines changed
lib/sidekiq/statistic/statistic 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ def display
18
18
end
19
19
20
20
def display_by_last_status
21
- filtered_workers = display . group_by { |worker | worker [ :last_job_status ] }
21
+ filtered_workers = display . group_by { |worker | worker [ :last_job_status ] }
22
22
23
23
filtered_workers [ 'passed' ] ||= [ ]
24
24
filtered_workers [ 'failed' ] ||= [ ]
25
25
26
- filtered_workers . transform_keys ( & :to_sym )
26
+ filtered_workers
27
27
end
28
28
29
29
def display_per_day ( worker_name )
Original file line number Diff line number Diff line change @@ -112,14 +112,14 @@ module Statistic
112
112
113
113
_ ( subject ) . must_be_instance_of Hash
114
114
assert_equal subject . keys . sort ,
115
- %i [ passed failed ] . sort
115
+ %w [ passed failed ] . sort
116
116
117
- _ ( subject [ : passed] ) . must_be_instance_of Array
118
- _ ( subject [ : failed] ) . must_be_instance_of Array
119
- assert_equal subject [ : passed] [ 0 ] . keys . sort ,
117
+ _ ( subject [ ' passed' ] ) . must_be_instance_of Array
118
+ _ ( subject [ ' failed' ] ) . must_be_instance_of Array
119
+ assert_equal subject [ ' passed' ] [ 0 ] . keys . sort ,
120
120
%i[ name last_job_status number_of_calls queue runtime ] . sort
121
121
122
- assert_equal worker , subject [ : passed] [ 0 ] [ :name ]
122
+ assert_equal worker , subject [ ' passed' ] [ 0 ] [ :name ]
123
123
end
124
124
end
125
125
You can’t perform that action at this time.
0 commit comments