summaryrefslogtreecommitdiff
path: root/spec/uploaders
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2018-06-05 16:18:06 -0500
committerRobert Speicher <rspeicher@gmail.com>2018-06-07 09:54:41 -0500
commit6d165c740cecf6aff4c7ec0bbb962e7964c15f1b (patch)
tree69df90ce77be1a6c679275f4fef7af5efba91095 /spec/uploaders
parent0b4312c676ec5d7d07cf866a80dda5da2dbe1b9e (diff)
downloadgitlab-ce-6d165c740cecf6aff4c7ec0bbb962e7964c15f1b.tar.gz
Make all uses of `fixture_file_upload` use relative paths
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/attachment_uploader_spec.rb2
-rw-r--r--spec/uploaders/file_mover_spec.rb2
-rw-r--r--spec/uploaders/file_uploader_spec.rb2
-rw-r--r--spec/uploaders/job_artifact_uploader_spec.rb2
-rw-r--r--spec/uploaders/namespace_file_uploader_spec.rb2
-rw-r--r--spec/uploaders/object_storage_spec.rb2
-rw-r--r--spec/uploaders/personal_file_uploader_spec.rb2
-rw-r--r--spec/uploaders/records_uploads_spec.rb2
-rw-r--r--spec/uploaders/uploader_helper_spec.rb2
9 files changed, 9 insertions, 9 deletions
diff --git a/spec/uploaders/attachment_uploader_spec.rb b/spec/uploaders/attachment_uploader_spec.rb
index d302c14efb9..a9415854d25 100644
--- a/spec/uploaders/attachment_uploader_spec.rb
+++ b/spec/uploaders/attachment_uploader_spec.rb
@@ -26,7 +26,7 @@ describe AttachmentUploader do
describe "#migrate!" do
before do
- uploader.store!(fixture_file_upload(Rails.root.join('spec/fixtures/doc_sample.txt')))
+ uploader.store!(fixture_file_upload(File.join('spec/fixtures/doc_sample.txt')))
stub_uploads_object_storage
end
diff --git a/spec/uploaders/file_mover_spec.rb b/spec/uploaders/file_mover_spec.rb
index 68b7e24776d..de29d0c943f 100644
--- a/spec/uploaders/file_mover_spec.rb
+++ b/spec/uploaders/file_mover_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe FileMover do
let(:filename) { 'banana_sample.gif' }
- let(:file) { fixture_file_upload(Rails.root.join('spec', 'fixtures', filename)) }
+ let(:file) { fixture_file_upload(File.join('spec', 'fixtures', filename)) }
let(:temp_file_path) { File.join('uploads/-/system/temp', 'secret55', filename) }
let(:temp_description) do
diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb
index db2810bbe1d..59013a02938 100644
--- a/spec/uploaders/file_uploader_spec.rb
+++ b/spec/uploaders/file_uploader_spec.rb
@@ -89,7 +89,7 @@ describe FileUploader do
describe "#migrate!" do
before do
- uploader.store!(fixture_file_upload(Rails.root.join('spec/fixtures/dk.png')))
+ uploader.store!(fixture_file_upload('spec/fixtures/dk.png'))
stub_uploads_object_storage
end
diff --git a/spec/uploaders/job_artifact_uploader_spec.rb b/spec/uploaders/job_artifact_uploader_spec.rb
index 42036d67f3d..179c94ec3bc 100644
--- a/spec/uploaders/job_artifact_uploader_spec.rb
+++ b/spec/uploaders/job_artifact_uploader_spec.rb
@@ -81,7 +81,7 @@ describe JobArtifactUploader do
describe "#migrate!" do
before do
- uploader.store!(fixture_file_upload(Rails.root.join('spec/fixtures/trace/sample_trace')))
+ uploader.store!(fixture_file_upload(File.join('spec/fixtures/trace/sample_trace')))
stub_artifacts_object_storage
end
diff --git a/spec/uploaders/namespace_file_uploader_spec.rb b/spec/uploaders/namespace_file_uploader_spec.rb
index a8ba01d70b8..71fe2c353c0 100644
--- a/spec/uploaders/namespace_file_uploader_spec.rb
+++ b/spec/uploaders/namespace_file_uploader_spec.rb
@@ -28,7 +28,7 @@ describe NamespaceFileUploader do
describe "#migrate!" do
before do
- uploader.store!(fixture_file_upload(Rails.root.join('spec/fixtures/doc_sample.txt')))
+ uploader.store!(fixture_file_upload(File.join('spec/fixtures/doc_sample.txt')))
stub_uploads_object_storage
end
diff --git a/spec/uploaders/object_storage_spec.rb b/spec/uploaders/object_storage_spec.rb
index 4503288e410..0bc5b6751b3 100644
--- a/spec/uploaders/object_storage_spec.rb
+++ b/spec/uploaders/object_storage_spec.rb
@@ -571,7 +571,7 @@ describe ObjectStorage do
context 'when local file is used' do
context 'when valid file is used' do
let(:uploaded_file) do
- fixture_file_upload(Rails.root + 'spec/fixtures/rails_sample.jpg', 'image/jpg')
+ fixture_file_upload('spec/fixtures/rails_sample.jpg', 'image/jpg')
end
it "properly caches the file" do
diff --git a/spec/uploaders/personal_file_uploader_spec.rb b/spec/uploaders/personal_file_uploader_spec.rb
index c70521d90dc..7700b14ce6b 100644
--- a/spec/uploaders/personal_file_uploader_spec.rb
+++ b/spec/uploaders/personal_file_uploader_spec.rb
@@ -45,7 +45,7 @@ describe PersonalFileUploader do
describe "#migrate!" do
before do
- uploader.store!(fixture_file_upload(Rails.root.join('spec/fixtures/doc_sample.txt')))
+ uploader.store!(fixture_file_upload('spec/fixtures/doc_sample.txt'))
stub_uploads_object_storage
end
diff --git a/spec/uploaders/records_uploads_spec.rb b/spec/uploaders/records_uploads_spec.rb
index 9a3e5d83e01..3592a11360d 100644
--- a/spec/uploaders/records_uploads_spec.rb
+++ b/spec/uploaders/records_uploads_spec.rb
@@ -16,7 +16,7 @@ describe RecordsUploads do
end
def upload_fixture(filename)
- fixture_file_upload(Rails.root.join('spec', 'fixtures', filename))
+ fixture_file_upload(File.join('spec', 'fixtures', filename))
end
describe 'callbacks' do
diff --git a/spec/uploaders/uploader_helper_spec.rb b/spec/uploaders/uploader_helper_spec.rb
index c47f09adb6d..33da93cc9d0 100644
--- a/spec/uploaders/uploader_helper_spec.rb
+++ b/spec/uploaders/uploader_helper_spec.rb
@@ -12,7 +12,7 @@ describe UploaderHelper do
end
def upload_fixture(filename)
- fixture_file_upload(Rails.root.join('spec', 'fixtures', filename))
+ fixture_file_upload(File.join('spec', 'fixtures', filename))
end
describe '#image_or_video?' do