diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-18 00:09:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-18 00:09:23 +0300 |
commit | 1d84a028b42a1a3aed36a0f3a6cae970c8df8e69 (patch) | |
tree | 1ebd0249d20169a0b8be47dc541e9c2676d62648 /spec/workers/merge_worker_spec.rb | |
parent | ec72da1833d94bb1556af94193ccf2a93c9cb939 (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 97e8aeb616e..fc050870225 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 |