diff options
author | Sean McGivern <sean@gitlab.com> | 2019-03-26 12:22:14 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-03-26 12:22:14 +0300 |
commit | 2ce68fd3a5a286cc5a1c438431df905a532d03fc (patch) | |
tree | 502603b16290f0d494cb3057f71add3bff685677 /spec/lib | |
parent | 849eb7c6e246b103a6837b969bb2a46aad9065e7 (diff) | |
parent | 541a55c934103647c39e33b71da9ff4ab3aada87 (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!26445
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/git/commit_spec.rb | 12 |
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 |