Commit f5884721 authored by James Edwards-Jones's avatar James Edwards-Jones

Fix new rubocop errors

parent fcf0a56b
Pipeline #6786444 failed with stages
in 141 minutes and 42 seconds
......@@ -20,7 +20,7 @@
#
class IssuableFinder
NONE = '0'.freeze
VALID_PARAMS = %i(scope state group_id project_id milestone_title assignee_id search label_name sort)
VALID_PARAMS = %i(scope state group_id project_id milestone_title assignee_id search label_name sort).freeze
attr_accessor :current_user, :params
......
......@@ -5,13 +5,12 @@ module Issues
@labels = @issues.labels_hash
end
def render
def csv_data
csv_builder.render
end
def email(user, project)
content = render
Notify.issues_csv_email(user, project, content, @issues.count).deliver_now
Notify.issues_csv_email(user, project, csv_data, @issues.count).deliver_now
end
private
......
......@@ -6,7 +6,7 @@ class ExportCsvWorker
@current_user = User.find(current_user_id)
@project = Project.find(project_id)
params.merge!(project_id: project_id)
params[:project_id] = project_id
issues = IssuesFinder.new(@current_user, params.symbolize_keys).execute
......
......@@ -7,7 +7,7 @@ describe Issues::ExportCsvService, services: true do
let(:subject) { described_class.new(Issue.all) }
it 'renders csv to string' do
expect(subject.render).to be_a String
expect(subject.csv_data).to be_a String
end
describe '#email' do
......@@ -17,7 +17,7 @@ describe Issues::ExportCsvService, services: true do
end
def csv
CSV.parse(subject.render, headers: true)
CSV.parse(subject.csv_data, headers: true)
end
context 'includes' 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