Commit be3b6ac7 authored by Timothy Andrew's avatar Timothy Andrew

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.
parent 57995172
......@@ -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
......
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