Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 15:09:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-06 15:09:05 +0300
commit669ad9e431c7647f01bda681aab2c0ad2cb58826 (patch)
tree13fac2c7a8f4c4f8f715ed0dd351470dee3918a1 /spec/workers
parent3c21cbd6a81d7b962a5d9a72ba8e03f3bf449af8 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/clusters/applications/activate_service_worker_spec.rb2
-rw-r--r--spec/workers/delete_diff_files_worker_spec.rb6
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/workers/clusters/applications/activate_service_worker_spec.rb b/spec/workers/clusters/applications/activate_service_worker_spec.rb
index 019bfe7a750..d13ff76613c 100644
--- a/spec/workers/clusters/applications/activate_service_worker_spec.rb
+++ b/spec/workers/clusters/applications/activate_service_worker_spec.rb
@@ -46,7 +46,7 @@ RSpec.describe Clusters::Applications::ActivateServiceWorker, '#perform' do
context 'cluster does not exist' do
it 'does not raise Record Not Found error' do
- expect { described_class.new.perform(0, 'ignored in this context') }.not_to raise_error(ActiveRecord::RecordNotFound)
+ expect { described_class.new.perform(0, 'ignored in this context') }.not_to raise_error
end
end
end
diff --git a/spec/workers/delete_diff_files_worker_spec.rb b/spec/workers/delete_diff_files_worker_spec.rb
index cf26dbabb97..c124847ca45 100644
--- a/spec/workers/delete_diff_files_worker_spec.rb
+++ b/spec/workers/delete_diff_files_worker_spec.rb
@@ -34,11 +34,13 @@ RSpec.describe DeleteDiffFilesWorker do
end
it 'rollsback if something goes wrong' do
+ error = RuntimeError.new('something went wrong')
+
expect(MergeRequestDiffFile).to receive_message_chain(:where, :delete_all)
- .and_raise
+ .and_raise(error)
expect { described_class.new.perform(merge_request_diff.id) }
- .to raise_error
+ .to raise_error(error)
merge_request_diff.reload