diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-08-19 19:02:17 +0300 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-08-19 23:29:24 +0300 |
commit | 0e9d202b8c0f60e0348f916a0901327af891807e (patch) | |
tree | 88ad7cbdbc67cdebee4c62c1245271199e81c4bd | |
parent | 925a8ed13fcb658d6afba73227c28aae8aa6aa50 (diff) |
Merge branch '21081-repository-merge-in-progress-merge-commit-sha-spec' into 'master'
Add a spec testing a second side effect of `Repository#merge`.
## What are the relevant issue numbers?
- Closes #21081
- Related to gitlab-org/gitlab-ee!671
- Related to gitlab-org/gitlab-ee#900
See merge request !5886
-rw-r--r-- | spec/models/repository_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index f7dbfd712cc..1fea50ad42c 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -719,6 +719,14 @@ describe Repository, models: true do expect(merge_commit).to be_present expect(repository.blob_at(merge_commit.id, 'files/ruby/feature.rb')).to be_present end + + it 'sets the `in_progress_merge_commit_sha` flag for the given merge request' do + merge_request = create(:merge_request, source_branch: 'feature', target_branch: 'master', source_project: project) + merge_commit_id = repository.merge(user, merge_request, commit_options) + repository.commit(merge_commit_id) + + expect(merge_request.in_progress_merge_commit_sha).to eq(merge_commit_id) + end end describe '#revert' do |