summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 10:40:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-26 10:40:27 +0000
commitf649a7dab8cde9c06ea4b0fb6975cb10bc9e4c84 (patch)
treec7901753687863c95d690f1914f9dc77c7b20171 /spec
parentc22ba132adda00c9910ab9155a39a82370813003 (diff)
downloadgitlab-ce-f649a7dab8cde9c06ea4b0fb6975cb10bc9e4c84.tar.gz
Add latest changes from gitlab-org/security/gitlab@12-8-stable-ee
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/uploaded_file_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/uploaded_file_spec.rb b/spec/lib/uploaded_file_spec.rb
index 2bbbd67b13c..25536c07dd9 100644
--- a/spec/lib/uploaded_file_spec.rb
+++ b/spec/lib/uploaded_file_spec.rb
@@ -59,6 +59,16 @@ describe UploadedFile do
expect(subject.sha256).to eq('sha256')
expect(subject.remote_id).to eq('remote_id')
end
+
+ it 'handles a blank path' do
+ params['file.path'] = ''
+
+ # Not a real file, so can't determine size itself
+ params['file.size'] = 1.byte
+
+ expect { described_class.from_params(params, :file, upload_path) }
+ .not_to raise_error
+ end
end
end