diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-14 12:09:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-14 12:09:14 +0000 |
commit | 49089d4fb1f5c17328ac61c955d95a68c6d4d545 (patch) | |
tree | 309d97ce6cbc1b22935dd0e11cc72abd767ffcf3 /spec/services/branches | |
parent | 846a84f2e9d6149b00c63ccae2850421f6766bac (diff) | |
download | gitlab-ce-49089d4fb1f5c17328ac61c955d95a68c6d4d545.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/branches')
-rw-r--r-- | spec/services/branches/delete_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/branches/delete_service_spec.rb b/spec/services/branches/delete_service_spec.rb index b57817e9f59..f1e7c9340b1 100644 --- a/spec/services/branches/delete_service_spec.rb +++ b/spec/services/branches/delete_service_spec.rb @@ -10,6 +10,10 @@ RSpec.describe Branches::DeleteService do subject(:service) { described_class.new(project, user) } shared_examples 'a deleted branch' do |branch_name| + before do + allow(Ci::RefDeleteUnlockArtifactsWorker).to receive(:perform_async) + end + it 'removes the branch' do expect(branch_exists?(branch_name)).to be true @@ -18,6 +22,12 @@ RSpec.describe Branches::DeleteService do expect(result.status).to eq :success expect(branch_exists?(branch_name)).to be false end + + it 'calls the RefDeleteUnlockArtifactsWorker' do + expect(Ci::RefDeleteUnlockArtifactsWorker).to receive(:perform_async).with(project.id, user.id, "refs/heads/#{branch_name}") + + service.execute(branch_name) + end end describe '#execute' do |