diff options
author | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-11 21:23:00 +0200 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2017-04-28 16:44:41 +0200 |
commit | fe771b51fd80dd0926a31091b18a935a01fe1296 (patch) | |
tree | 1e1b320fbfb71330476e7c7a89094bc0aaf0f2bc /spec/models | |
parent | e57545351b22f7d31839c4fc2f4bb760ef0e75a4 (diff) | |
download | gitlab-ce-fe771b51fd80dd0926a31091b18a935a01fe1296.tar.gz |
Fix Gitaly::Commit#is_ancestor30586-fix-gitaly-is-ancestor
- Upgrade Gitaly-version
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/repository_spec.rb | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 98d0641443e..f6846cc1b2f 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1849,17 +1849,15 @@ describe Repository, models: true do end end - # TODO: Uncomment when feature is reenabled - # describe '#is_ancestor?' do - # context 'Gitaly is_ancestor feature enabled' do - # it 'asks Gitaly server if it\'s an ancestor' do - # commit = repository.commit - # allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(:is_ancestor).and_return(true) - # expect(Gitlab::GitalyClient::Commit).to receive(:is_ancestor). - # with(repository.raw_repository, commit.id, commit.id).and_return(true) - # - # expect(repository.is_ancestor?(commit.id, commit.id)).to be true - # end - # end - # end + describe '#is_ancestor?' do + context 'Gitaly is_ancestor feature enabled' do + it "asks Gitaly server if it's an ancestor" do + commit = repository.commit + expect(repository.raw_repository).to receive(:is_ancestor?).and_call_original + allow(Gitlab::GitalyClient).to receive(:feature_enabled?).with(:is_ancestor).and_return(true) + + expect(repository.is_ancestor?(commit.id, commit.id)).to be true + end + end + end end |