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:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 00:42:11 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 01:37:12 +0300
commit05683f313b40e1c37fbfbb04bd4d0e368dc5b39a (patch)
tree2ab5d454d1509ac68890ecf65c39fa61279ee389 /spec/uploaders
parent652eb0118b3cf87f96dfbaacf5802d974303e427 (diff)
Fix filename method of GitlabUploader to return always real filename
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/artifact_uploader_spec.rb16
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