diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-10-11 17:27:04 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-10-12 12:41:22 +0300 |
commit | 71d71afb3ac5f302470e66ace4f59e247249d99e (patch) | |
tree | 0d869436e2ab72454ebb117cc3808ad764652e55 /spec/models/repository_spec.rb | |
parent | 75723034cee27d387d7ac7edb88d1520bb3a6b7b (diff) |
Allow getting the merge base of multiple revisions
As we now support getting the merge base for multiple revisions in
gitaly, we can provide this functionality in our API
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r-- | spec/models/repository_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index aed8e02cc23..6f5a4118b95 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -2386,4 +2386,15 @@ describe Repository do end end end + + describe '#merge_base' do + set(:project) { create(:project, :repository) } + subject(:repository) { project.repository } + + it 'only makes one gitaly call' do + expect(Gitlab::GitalyClient).to receive(:call).once.and_call_original + + repository.merge_base('master', 'fix') + end + end end |