diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-06-13 07:17:03 +0000 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-06-15 11:15:39 -0500 |
commit | 8b3d32d29f464a2c6cda2b0ccbe41a00f11d2dce (patch) | |
tree | 74eeef9e46dfa75ed298ba7e1e5924e9365946c9 /spec/uploaders/artifact_uploader_spec.rb | |
parent | 3ae25c5caaa67836600144b5f210ab2d53f866b8 (diff) | |
download | gitlab-ce-8b3d32d29f464a2c6cda2b0ccbe41a00f11d2dce.tar.gz |
Merge branch 'fix-filename-of-artifact-uploader' into 'master'
Fix filename method of GitlabUploader to return always real filename
Closes #33524
See merge request !12113
Diffstat (limited to 'spec/uploaders/artifact_uploader_spec.rb')
-rw-r--r-- | spec/uploaders/artifact_uploader_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/uploaders/artifact_uploader_spec.rb b/spec/uploaders/artifact_uploader_spec.rb index b3fac65c55e..2a3bd0e3bb2 100644 --- a/spec/uploaders/artifact_uploader_spec.rb +++ b/spec/uploaders/artifact_uploader_spec.rb @@ -42,4 +42,20 @@ describe ArtifactUploader do it { is_expected.to start_with(path) } it { is_expected.to end_with('/tmp/work') } end + + describe '#filename' do + # we need to use uploader, as this makes to use mounter + # which initialises uploader.file object + let(:uploader) { job.artifacts_file } + + subject { uploader.filename } + + it { is_expected.to be_nil } + + context 'with artifacts' do + let(:job) { create(:ci_build, :artifacts) } + + it { is_expected.not_to be_nil } + end + end end |