diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 19:35:06 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:41 +0300 |
commit | 87467127b6e0927d56e532f4d6adc4091ff9ef6f (patch) | |
tree | 10e220a998ca2ef41221a6f53b4dc08c762df607 /spec | |
parent | 5f72aaa303aabdb2258959e84b446074bf8a6915 (diff) |
replace `is_ancestor?` with `ancestor?`
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/repository_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 462e92b8b62..3151649b64e 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -2036,23 +2036,23 @@ describe Repository, models: true do end end - describe '#is_ancestor?' do + describe '#ancestor?' do let(:commit) { repository.commit } let(:ancestor) { commit.parents.first } context 'with Gitaly enabled' do it 'it is an ancestor' do - expect(repository.is_ancestor?(ancestor.id, commit.id)).to eq(true) + expect(repository.ancestor?(ancestor.id, commit.id)).to eq(true) end it 'it is not an ancestor' do - expect(repository.is_ancestor?(commit.id, ancestor.id)).to eq(false) + expect(repository.ancestor?(commit.id, ancestor.id)).to eq(false) end it 'returns false on nil-values' do - expect(repository.is_ancestor?(nil, commit.id)).to eq(false) - expect(repository.is_ancestor?(ancestor.id, nil)).to eq(false) - expect(repository.is_ancestor?(nil, nil)).to eq(false) + expect(repository.ancestor?(nil, commit.id)).to eq(false) + expect(repository.ancestor?(ancestor.id, nil)).to eq(false) + expect(repository.ancestor?(nil, nil)).to eq(false) end end @@ -2063,17 +2063,17 @@ describe Repository, models: true do end it 'it is an ancestor' do - expect(repository.is_ancestor?(ancestor.id, commit.id)).to eq(true) + expect(repository.ancestor?(ancestor.id, commit.id)).to eq(true) end it 'it is not an ancestor' do - expect(repository.is_ancestor?(commit.id, ancestor.id)).to eq(false) + expect(repository.ancestor?(commit.id, ancestor.id)).to eq(false) end it 'returns false on nil-values' do - expect(repository.is_ancestor?(nil, commit.id)).to eq(false) - expect(repository.is_ancestor?(ancestor.id, nil)).to eq(false) - expect(repository.is_ancestor?(nil, nil)).to eq(false) + expect(repository.ancestor?(nil, commit.id)).to eq(false) + expect(repository.ancestor?(ancestor.id, nil)).to eq(false) + expect(repository.ancestor?(nil, nil)).to eq(false) end end end |