Commit 793d9682 authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch '290823-fix-issuable-export-csv-worker-type' into 'master'

Fix issuable type comparison in IssuableExportCsvWorker

See merge request gitlab-org/gitlab!53472
parents 965f57d3 697904d9
...@@ -11,7 +11,7 @@ module EE ...@@ -11,7 +11,7 @@ module EE
override :export_service override :export_service
def export_service(type, user, project, params) def export_service(type, user, project, params)
return super unless type == :requirement return super unless type.to_sym == :requirement
fields = params.with_indifferent_access.delete(:selected_fields) || [] fields = params.with_indifferent_access.delete(:selected_fields) || []
issuable_classes = issuable_classes_for(type.to_sym) issuable_classes = issuable_classes_for(type.to_sym)
...@@ -21,7 +21,7 @@ module EE ...@@ -21,7 +21,7 @@ module EE
override :issuable_classes_for override :issuable_classes_for
def issuable_classes_for(type) def issuable_classes_for(type)
return super unless type == :requirement return super unless type.to_sym == :requirement
{ finder: ::RequirementsManagement::RequirementsFinder, service: ::RequirementsManagement::ExportCsvService } { finder: ::RequirementsManagement::RequirementsFinder, service: ::RequirementsManagement::ExportCsvService }
end end
......
...@@ -10,7 +10,7 @@ RSpec.describe IssuableExportCsvWorker do ...@@ -10,7 +10,7 @@ RSpec.describe IssuableExportCsvWorker do
subject { described_class.new.perform(issuable_type, user.id, project.id, params) } subject { described_class.new.perform(issuable_type, user.id, project.id, params) }
context 'when issuable type is :requirement' do context 'when issuable type is :requirement' do
let(:issuable_type) { :requirement } let(:issuable_type) { 'requirement' }
it 'emails a CSV' do it 'emails a CSV' do
expect { subject }.to change(ActionMailer::Base.deliveries, :size).by(1) expect { subject }.to change(ActionMailer::Base.deliveries, :size).by(1)
......
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