Commit f588a393 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'coverage-reports-controller-kw-args' into 'master'

Splat a hash into kwargs for coverage reports finding

See merge request gitlab-org/gitlab!48278
parents 51eb14f8 2c34eba1
...@@ -11,7 +11,7 @@ class Groups::Analytics::CoverageReportsController < Groups::Analytics::Applicat ...@@ -11,7 +11,7 @@ class Groups::Analytics::CoverageReportsController < Groups::Analytics::Applicat
def index def index
respond_to do |format| respond_to do |format|
format.csv do format.csv do
track_event(:download_code_coverage_csv, download_tracker_params) track_event(:download_code_coverage_csv, **download_tracker_params)
send_data(render_csv(report_results), type: 'text/csv; charset=utf-8') send_data(render_csv(report_results), type: 'text/csv; charset=utf-8')
end end
end end
...@@ -32,7 +32,7 @@ class Groups::Analytics::CoverageReportsController < Groups::Analytics::Applicat ...@@ -32,7 +32,7 @@ class Groups::Analytics::CoverageReportsController < Groups::Analytics::Applicat
end end
def report_results def report_results
Ci::DailyBuildGroupReportResultsByGroupFinder.new(finder_params).execute Ci::DailyBuildGroupReportResultsByGroupFinder.new(**finder_params).execute
end end
def finder_params def finder_params
......
...@@ -39,7 +39,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsByGroupFinder do ...@@ -39,7 +39,7 @@ RSpec.describe Ci::DailyBuildGroupReportResultsByGroupFinder do
end end
subject do subject do
described_class.new(attributes).execute described_class.new(**attributes).execute
end end
context 'when current user is allowed to :read_group_build_report_results' do context 'when current user is allowed to :read_group_build_report_results' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment