diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 18:07:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-24 18:07:55 +0000 |
commit | 603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc (patch) | |
tree | 907f5b8ee1b6f5aad396e95e3327a08400b9e8ea /spec/uploaders | |
parent | 120f4aaedc8fe830a3f572491d240d8ee6addefb (diff) | |
download | gitlab-ce-603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/content_type_whitelist_spec.rb | 1 | ||||
-rw-r--r-- | spec/uploaders/job_artifact_uploader_spec.rb | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/spec/uploaders/content_type_whitelist_spec.rb b/spec/uploaders/content_type_whitelist_spec.rb index be519ead1c8..4689f83759d 100644 --- a/spec/uploaders/content_type_whitelist_spec.rb +++ b/spec/uploaders/content_type_whitelist_spec.rb @@ -18,6 +18,7 @@ describe ContentTypeWhitelist do let(:path) { File.join('spec', 'fixtures', 'rails_sample.jpg') } it_behaves_like 'accepted carrierwave upload' + it_behaves_like 'upload with content type', 'image/jpeg' end context 'upload non-whitelisted file content type' do diff --git a/spec/uploaders/job_artifact_uploader_spec.rb b/spec/uploaders/job_artifact_uploader_spec.rb index 60b5a6697b1..a03cf3b9dea 100644 --- a/spec/uploaders/job_artifact_uploader_spec.rb +++ b/spec/uploaders/job_artifact_uploader_spec.rb @@ -97,5 +97,12 @@ describe JobArtifactUploader do it_behaves_like "migrates", to_store: described_class::Store::REMOTE it_behaves_like "migrates", from_store: described_class::Store::REMOTE, to_store: described_class::Store::LOCAL + + # CI job artifacts usually are shown as text/plain, but they contain + # escape characters so MIME detectors usually fail to determine what + # the Content-Type is. + it 'does not set Content-Type' do + expect(uploader.file.content_type).to be_blank + end end end |