Commit 1f127006 authored by Douwe Maan's avatar Douwe Maan

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
parents 4ecfd74f be3b6ac7
...@@ -719,6 +719,14 @@ describe Repository, models: true do ...@@ -719,6 +719,14 @@ describe Repository, models: true do
expect(merge_commit).to be_present expect(merge_commit).to be_present
expect(repository.blob_at(merge_commit.id, 'files/ruby/feature.rb')).to be_present expect(repository.blob_at(merge_commit.id, 'files/ruby/feature.rb')).to be_present
end 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 end
describe '#revert' do describe '#revert' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment