summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/git
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-04-14 07:26:03 -0700
committerOswaldo Ferreira <>2019-04-18 22:01:51 -0300
commit5d74c95c988cdd9c1c761de3a78c3dc191e4fe52 (patch)
treef6d0c19e4b591a08fc50ae1b2d4f9252f59ea747 /spec/lib/gitlab/git
parent54d64ec9f62f5c271b3ed649530a3a2eaa482206 (diff)
downloadgitlab-ce-5d74c95c988cdd9c1c761de3a78c3dc191e4fe52.tar.gz
Check that source and target branch exist
This ensures the return value is consistent if the source and/or branch do not exist.
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index a98b04feb9c..aa800db4f16 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -1977,7 +1977,7 @@ describe Gitlab::Git::Repository, :seed_helper do
expect(compare.commits.count).to be > 0
end
- it 'returns nil when source ref does not exist' do
+ it 'returns empty commits when source ref does not exist' do
compare = repository.compare_source_branch('master', repository, 'non-existent-branch', straight: false)
expect(compare.commits).to be_empty