diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-01-05 13:47:28 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-01-05 13:47:28 +0300 |
commit | 3bb68efb7acc8b39bf996901fe89651d198b54d3 (patch) | |
tree | 07bf36db922d0450f30e43922974791da1a8bfa6 /spec/lib | |
parent | 4dd0c55f059154a8d866a16e4753212895061024 (diff) | |
parent | 6b15784ce7d893ed509c00d9f51a4702787799ed (diff) |
Merge branch 'zj-blob-batch' into 'master'
Reroute batch blobs to single blob RPC
See merge request gitlab-org/gitlab-ce!16082
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/git/blob_spec.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb index c04a9688503..7f5946b1658 100644 --- a/spec/lib/gitlab/git/blob_spec.rb +++ b/spec/lib/gitlab/git/blob_spec.rb @@ -202,16 +202,6 @@ describe Gitlab::Git::Blob, seed_helper: true do context 'limiting' do subject { described_class.batch(repository, blob_references, blob_size_limit: blob_size_limit) } - context 'default' do - let(:blob_size_limit) { nil } - - it 'limits to MAX_DATA_DISPLAY_SIZE' do - stub_const('Gitlab::Git::Blob::MAX_DATA_DISPLAY_SIZE', 100) - - expect(subject.first.data.size).to eq(100) - end - end - context 'positive' do let(:blob_size_limit) { 10 } @@ -221,7 +211,10 @@ describe Gitlab::Git::Blob, seed_helper: true do context 'zero' do let(:blob_size_limit) { 0 } - it { expect(subject.first.data).to eq('') } + it 'only loads the metadata' do + expect(subject.first.size).not_to be(0) + expect(subject.first.data).to eq('') + end end context 'negative' do |