diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-19 15:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-19 15:09:13 +0300 |
commit | cd3e2c7b9355f8990ab294b34b5e4add4f3985fa (patch) | |
tree | 77264b3e569ec95da8476f604d3d5cf4b03e85dc /spec/lib/gitlab/git | |
parent | c1fc5da123a1fe670e32740669a9d5e59eff38f5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r-- | spec/lib/gitlab/git/blob_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb index 521c03058ca..3277e02aafa 100644 --- a/spec/lib/gitlab/git/blob_spec.rb +++ b/spec/lib/gitlab/git/blob_spec.rb @@ -12,10 +12,18 @@ describe Gitlab::Git::Blob, :seed_helper do let(:blob) { Gitlab::Git::Blob.new(name: 'test') } it 'handles nil data' do + expect(described_class).not_to receive(:gitlab_blob_size) + expect(blob.name).to eq('test') expect(blob.size).to eq(nil) expect(blob.loaded_size).to eq(nil) end + + it 'records blob size' do + expect(described_class).to receive(:gitlab_blob_size).and_call_original + + Gitlab::Git::Blob.new(name: 'test', size: 1234) + end end shared_examples '.find' do |