Add a spec testing a second side effect of `Repository#merge`.
- It sets the `in_progress_merge_commit_sha` variable on the given merge request, so that the branch permissions (developers can merge) check can proceed in the `pre-receive` hook.
This commit is contained in:
parent
579951720a
commit
be3b6ac74b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue