Skip to content
代码片段 群组 项目
提交 f5884721 编辑于 作者: James Edwards-Jones's avatar James Edwards-Jones
浏览文件

Fix new rubocop errors

上级 fcf0a56b
No related branches found
No related tags found
无相关合并请求
......@@ -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 @@ def initialize(issues_relation)
@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 @@ def perform(current_user_id, project_id, params)
@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 @@
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 @@
end
def csv
CSV.parse(subject.render, headers: true)
CSV.parse(subject.csv_data, headers: true)
end
context 'includes' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册