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
path: root/spec/lib
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-18 03:24:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-18 03:24:03 +0300
commitcfa5faaae0d9ac9a3c1fafb1a41e07b298029f48 (patch)
treeb7ce1807d00c85cb94cbdc4a031562623e5343d6 /spec/lib
parentab5b519cca2356dd2b84a7fffc6ddbd6dc43a0ab (diff)
Add latest changes from gitlab-org/gitlab@14-6-stable-ee
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 11510daf9c0..de342444c15 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -486,6 +486,16 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
expect(commits.first.sha).to eq(SeedRepo::Commit::ID)
expect(commits.second.sha).to eq(SeedRepo::FirstCommit::ID)
end
+
+ context 'when repo does not exist' do
+ let(:no_repository) { Gitlab::Git::Repository.new('default', '@does-not-exist/project', '', 'bogus/project') }
+
+ it 'returns empty commits' do
+ commits = described_class.batch_by_oid(no_repository, oids)
+
+ expect(commits.count).to eq(0)
+ end
+ end
end
context 'when oids is empty' do