diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 18:08:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-25 18:08:10 +0000 |
commit | 5d75b2b9a9d11c20667895e6aa68ea4e76658c5d (patch) | |
tree | 2aa529b0a153c805f5f4ecb357321a4e4f4c59cb /spec/lib/uploaded_file_spec.rb | |
parent | 6f2065c468b05658125b746169c56764a8ccddb1 (diff) | |
download | gitlab-ce-5d75b2b9a9d11c20667895e6aa68ea4e76658c5d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/uploaded_file_spec.rb')
-rw-r--r-- | spec/lib/uploaded_file_spec.rb | 10 |
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 |