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:
authorSean McGivern <sean@gitlab.com>2019-03-21 11:42:33 +0300
committerSean McGivern <sean@gitlab.com>2019-03-21 11:42:33 +0300
commit1efa960444a2a09bfb8d18c696f23aa281ad7fb3 (patch)
tree3a3875071b97df381a90eac90e575456e0c75cc2 /spec/lib
parentd0ea73e5e3486d37ca313736cffd03526c5b6c86 (diff)
parent5d4e02f17318a21a5c2b4fc588cad066a4cf7e59 (diff)
Merge branch '58805-allow-incomplete-commit-data-to-be-fetched-from-collection' into 'master'
Enrich commits with full data in CommitCollection Closes #58805 See merge request gitlab-org/gitlab-ce!26144
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 3fb41a626b2..4a4ac833e39 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -537,6 +537,18 @@ describe Gitlab::Git::Commit, :seed_helper do
end
end
+ describe '#gitaly_commit?' do
+ context 'when the commit data comes from gitaly' do
+ it { expect(commit.gitaly_commit?).to eq(true) }
+ end
+
+ context 'when the commit data comes from a Hash' do
+ let(:commit) { described_class.new(repository, sample_commit_hash) }
+
+ it { expect(commit.gitaly_commit?).to eq(false) }
+ end
+ end
+
describe '#has_zero_stats?' do
it { expect(commit.has_zero_stats?).to eq(false) }
end