Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-08-14 11:34:15 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-08-14 11:34:15 +0300
commit5ddc9ad0b92dd057354298d61ab03ae4076ac7f2 (patch)
tree7d40a7e1a71c6d09060c4861697fa4fe32d32411 /spec/models/repository_spec.rb
parent00c474ae4efd296138598d9fb6609322beb43da9 (diff)
Remove feature gate for ListNewCommits
Introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20087, this has been tested on .com now, and is stable. Closes https://gitlab.com/gitlab-org/gitaly/issues/1286 Closes https://gitlab.com/gitlab-org/gitaly/issues/1233
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb42
1 files changed, 16 insertions, 26 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index 52ec8dbe25a..2859d5149ec 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -296,41 +296,31 @@ describe Repository do
end
describe '#new_commits' do
- shared_examples 'finding unreferenced commits' do
- set(:project) { create(:project, :repository) }
- let(:repository) { project.repository }
+ set(:project) { create(:project, :repository) }
+ let(:repository) { project.repository }
- subject { repository.new_commits(rev) }
+ subject { repository.new_commits(rev) }
- context 'when there are no new commits' do
- let(:rev) { repository.commit.id }
+ context 'when there are no new commits' do
+ let(:rev) { repository.commit.id }
- it 'returns an empty array' do
- expect(subject).to eq([])
- end
+ it 'returns an empty array' do
+ expect(subject).to eq([])
end
+ end
- context 'when new commits are found' do
- let(:branch) { 'orphaned-branch' }
- let!(:rev) { repository.commit(branch).id }
+ context 'when new commits are found' do
+ let(:branch) { 'orphaned-branch' }
+ let!(:rev) { repository.commit(branch).id }
- it 'returns the commits' do
- repository.delete_branch(branch)
+ it 'returns the commits' do
+ repository.delete_branch(branch)
- expect(subject).not_to be_empty
- expect(subject).to all( be_a(::Commit) )
- expect(subject.size).to eq(1)
- end
+ expect(subject).not_to be_empty
+ expect(subject).to all( be_a(::Commit) )
+ expect(subject.size).to eq(1)
end
end
-
- context 'when Gitaly handles the request' do
- it_behaves_like 'finding unreferenced commits'
- end
-
- context 'when Gitaly is disabled', :disable_gitaly do
- it_behaves_like 'finding unreferenced commits'
- end
end
describe '#commits_by' do