summaryrefslogtreecommitdiff
path: root/spec/uploaders
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2018-06-06 16:26:00 -0500
committerRobert Speicher <rspeicher@gmail.com>2018-06-07 09:54:41 -0500
commitb38c75b3dc2dc655377a1b4070cb6f5242594dbe (patch)
tree658f1ea057aa6785ea4f378378a800b2b82f9d7f /spec/uploaders
parent6d165c740cecf6aff4c7ec0bbb962e7964c15f1b (diff)
downloadgitlab-ce-b38c75b3dc2dc655377a1b4070cb6f5242594dbe.tar.gz
Correct more usages of non-relative `fixture_file_upload` paths
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/gitlab_uploader_spec.rb2
-rw-r--r--spec/uploaders/job_artifact_uploader_spec.rb8
-rw-r--r--spec/uploaders/legacy_artifact_uploader_spec.rb3
3 files changed, 5 insertions, 8 deletions
diff --git a/spec/uploaders/gitlab_uploader_spec.rb b/spec/uploaders/gitlab_uploader_spec.rb
index 4fba122cce1..362f89424d4 100644
--- a/spec/uploaders/gitlab_uploader_spec.rb
+++ b/spec/uploaders/gitlab_uploader_spec.rb
@@ -62,7 +62,7 @@ describe GitlabUploader do
expect(FileUtils).to receive(:mv).with(anything, /^#{subject.work_dir}/).and_call_original
expect(FileUtils).to receive(:mv).with(/^#{subject.work_dir}/, /#{subject.cache_dir}/).and_call_original
- fixture = Rails.root.join('spec', 'fixtures', 'rails_sample.jpg')
+ fixture = File.join('spec', 'fixtures', 'rails_sample.jpg')
subject.cache!(fixture_file_upload(fixture))
expect(subject.file.path).to match(/#{subject.cache_dir}/)
diff --git a/spec/uploaders/job_artifact_uploader_spec.rb b/spec/uploaders/job_artifact_uploader_spec.rb
index 179c94ec3bc..026e4356ed6 100644
--- a/spec/uploaders/job_artifact_uploader_spec.rb
+++ b/spec/uploaders/job_artifact_uploader_spec.rb
@@ -29,8 +29,7 @@ describe JobArtifactUploader do
context 'when trace is stored in File storage' do
context 'when file exists' do
let(:file) do
- fixture_file_upload(
- Rails.root.join('spec/fixtures/trace/sample_trace'), 'text/plain')
+ fixture_file_upload('spec/fixtures/trace/sample_trace', 'text/plain')
end
before do
@@ -63,8 +62,7 @@ describe JobArtifactUploader do
context 'file is stored in valid local_path' do
let(:file) do
- fixture_file_upload(
- Rails.root.join('spec/fixtures/ci_build_artifacts.zip'), 'application/zip')
+ fixture_file_upload('spec/fixtures/ci_build_artifacts.zip', 'application/zip')
end
before do
@@ -81,7 +79,7 @@ describe JobArtifactUploader do
describe "#migrate!" do
before do
- uploader.store!(fixture_file_upload(File.join('spec/fixtures/trace/sample_trace')))
+ uploader.store!(fixture_file_upload('spec/fixtures/trace/sample_trace'))
stub_artifacts_object_storage
end
diff --git a/spec/uploaders/legacy_artifact_uploader_spec.rb b/spec/uploaders/legacy_artifact_uploader_spec.rb
index eeb6fd90c9d..0589563b502 100644
--- a/spec/uploaders/legacy_artifact_uploader_spec.rb
+++ b/spec/uploaders/legacy_artifact_uploader_spec.rb
@@ -44,8 +44,7 @@ describe LegacyArtifactUploader do
context 'file is stored in valid path' do
let(:file) do
- fixture_file_upload(
- Rails.root.join('spec/fixtures/ci_build_artifacts.zip'), 'application/zip')
+ fixture_file_upload('spec/fixtures/ci_build_artifacts.zip', 'application/zip')
end
before do