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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 15:08:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 15:08:51 +0300
commit8c4198cbe631278e87fee04157d23494fbb80cdb (patch)
treed35cf498af480389796fd9e5cb4bcc903aea60f3 /spec/lib/gitlab/git/blob_spec.rb
parent1ac794623a8be5dee111716a44dd04ff708f3541 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git/blob_spec.rb')
-rw-r--r--spec/lib/gitlab/git/blob_spec.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb
index 3277e02aafa..079f01c2c4e 100644
--- a/spec/lib/gitlab/git/blob_spec.rb
+++ b/spec/lib/gitlab/git/blob_spec.rb
@@ -22,7 +22,23 @@ describe Gitlab::Git::Blob, :seed_helper do
it 'records blob size' do
expect(described_class).to receive(:gitlab_blob_size).and_call_original
- Gitlab::Git::Blob.new(name: 'test', size: 1234)
+ Gitlab::Git::Blob.new(name: 'test', size: 4, data: 'abcd')
+ end
+
+ context 'when untruncated' do
+ it 'attempts to record gitlab_blob_truncated_false' do
+ expect(described_class).to receive(:gitlab_blob_truncated_false).and_call_original
+
+ Gitlab::Git::Blob.new(name: 'test', size: 4, data: 'abcd')
+ end
+ end
+
+ context 'when truncated' do
+ it 'attempts to record gitlab_blob_truncated_true' do
+ expect(described_class).to receive(:gitlab_blob_truncated_true).and_call_original
+
+ Gitlab::Git::Blob.new(name: 'test', size: 40, data: 'abcd')
+ end
end
end