diff options
| author | Douwe Maan <douwe@gitlab.com> | 2018-06-28 13:10:07 +0000 |
|---|---|---|
| committer | Douwe Maan <douwe@gitlab.com> | 2018-06-28 13:10:07 +0000 |
| commit | 37b1922237b1491f3dba45ac366d0d0477c7947f (patch) | |
| tree | 1d49f4cc9d033a60e6573eb4fa7d947473395eaa /spec | |
| parent | 63c64ab3236a5ddf45a2ca56683d07e4140ea90e (diff) | |
| parent | f369da063f4a07b6c30852a29e5ce1071e77b86a (diff) | |
| download | gitlab-ce-37b1922237b1491f3dba45ac366d0d0477c7947f.tar.gz | |
Merge branch 'zj-commits-between-mandatory' into 'master'
Commits between in Gitaly only
Closes gitaly#315
See merge request gitlab-org/gitlab-ce!20239
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/lib/gitlab/git/repository_spec.rb | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb index b78fe4ba310..6ec4b90d70c 100644 --- a/spec/lib/gitlab/git/repository_spec.rb +++ b/spec/lib/gitlab/git/repository_spec.rb @@ -996,46 +996,6 @@ describe Gitlab::Git::Repository, seed_helper: true do end end - describe "#rugged_commits_between" do - around do |example| - # TODO #rugged_commits_between will be removed, has been migrated to gitaly - Gitlab::GitalyClient::StorageSettings.allow_disk_access do - example.run - end - end - - context 'two SHAs' do - let(:first_sha) { 'b0e52af38d7ea43cf41d8a6f2471351ac036d6c9' } - let(:second_sha) { '0e50ec4d3c7ce42ab74dda1d422cb2cbffe1e326' } - - it 'returns the number of commits between' do - expect(repository.rugged_commits_between(first_sha, second_sha).count).to eq(3) - end - end - - context 'SHA and master branch' do - let(:sha) { 'b0e52af38d7ea43cf41d8a6f2471351ac036d6c9' } - let(:branch) { 'master' } - - it 'returns the number of commits between a sha and a branch' do - expect(repository.rugged_commits_between(sha, branch).count).to eq(5) - end - - it 'returns the number of commits between a branch and a sha' do - expect(repository.rugged_commits_between(branch, sha).count).to eq(0) # sha is before branch - end - end - - context 'two branches' do - let(:first_branch) { 'feature' } - let(:second_branch) { 'master' } - - it 'returns the number of commits between' do - expect(repository.rugged_commits_between(first_branch, second_branch).count).to eq(17) - end - end - end - describe '#count_commits_between' do subject { repository.count_commits_between('feature', 'master') } |
