summaryrefslogtreecommitdiff
path: root/spec/workers/export_csv_worker_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /spec/workers/export_csv_worker_spec.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/workers/export_csv_worker_spec.rb')
-rw-r--r--spec/workers/export_csv_worker_spec.rb20
1 files changed, 2 insertions, 18 deletions
diff --git a/spec/workers/export_csv_worker_spec.rb b/spec/workers/export_csv_worker_spec.rb
index 1a5b17ee35b..88ccfac0a02 100644
--- a/spec/workers/export_csv_worker_spec.rb
+++ b/spec/workers/export_csv_worker_spec.rb
@@ -10,25 +10,9 @@ RSpec.describe ExportCsvWorker do
described_class.new.perform(user.id, project.id, params)
end
- it 'emails a CSV' do
- expect {perform}.to change(ActionMailer::Base.deliveries, :size).by(1)
- end
-
- it 'ensures that project_id is passed to issues_finder' do
- expect(IssuesFinder).to receive(:new).with(anything, hash_including(project_id: project.id)).and_call_original
+ it 'delegates call to IssuableExportCsvWorker' do
+ expect(IssuableExportCsvWorker).to receive(:perform_async).with(:issue, user.id, project.id, anything)
perform
end
-
- it 'removes sort parameter' do
- expect(IssuesFinder).to receive(:new).with(anything, hash_not_including(:sort)).and_call_original
-
- perform
- end
-
- it 'converts controller string keys to symbol keys for IssuesFinder' do
- expect(IssuesFinder).to receive(:new).with(anything, hash_including(test_key: true)).and_call_original
-
- perform('test_key' => true)
- end
end