diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-26 18:10:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-26 18:10:20 +0300 |
commit | aad3ac9e5e59d47e389ff387e9fc2ae3a008de33 (patch) | |
tree | 42ab9daf2c541be5fe58798d7ea0d86b190c2df8 /spec/workers/merge_worker_spec.rb | |
parent | e5e0589e097991ca671a348de81331240e85719d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/merge_worker_spec.rb')
-rw-r--r-- | spec/workers/merge_worker_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/workers/merge_worker_spec.rb b/spec/workers/merge_worker_spec.rb index 417e6edce96..0268bc2388f 100644 --- a/spec/workers/merge_worker_spec.rb +++ b/spec/workers/merge_worker_spec.rb @@ -29,5 +29,23 @@ RSpec.describe MergeWorker do source_project.repository.expire_branches_cache expect(source_project.repository.branch_names).not_to include('markdown') end + + it_behaves_like 'an idempotent worker' do + let(:job_args) do + [ + merge_request.id, + merge_request.author_id, + commit_message: 'wow such merge', + sha: merge_request.diff_head_sha + ] + end + + it 'the merge request is still shown as merged' do + subject + + merge_request.reload + expect(merge_request).to be_merged + end + end end end |