summaryrefslogtreecommitdiff
path: root/spec/uploaders
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-01-03 10:39:59 +0100
committerJacob Vosmaer <jacob@gitlab.com>2017-01-03 15:37:32 +0100
commit0406a3579fecf91e964095638e7207e9c820f92e (patch)
tree09c1138b17dde15e4c9c4cf9004eff1a53bfa7c3 /spec/uploaders
parentec273b8d069bf3f9a12a2ffde545398cd2967eeb (diff)
downloadgitlab-ce-0406a3579fecf91e964095638e7207e9c820f92e.tar.gz
Don't delete files from spec/fixtures
Diffstat (limited to 'spec/uploaders')
-rw-r--r--spec/uploaders/file_uploader_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb
index bc86adfef68..6a712e33c96 100644
--- a/spec/uploaders/file_uploader_spec.rb
+++ b/spec/uploaders/file_uploader_spec.rb
@@ -17,7 +17,7 @@ describe FileUploader do
describe '#image_or_video?' do
context 'given an image file' do
before do
- @uploader.store!(File.new(Rails.root.join('spec', 'fixtures', 'rails_sample.jpg')))
+ @uploader.store!(fixture_file_upload(Rails.root.join('spec', 'fixtures', 'rails_sample.jpg')))
end
it 'detects an image based on file extension' do
@@ -27,7 +27,7 @@ describe FileUploader do
context 'given an video file' do
before do
- video_file = File.new(Rails.root.join('spec', 'fixtures', 'video_sample.mp4'))
+ video_file = fixture_file_upload(Rails.root.join('spec', 'fixtures', 'video_sample.mp4'))
@uploader.store!(video_file)
end
@@ -37,7 +37,7 @@ describe FileUploader do
end
it 'does not return image_or_video? for other types' do
- @uploader.store!(File.new(Rails.root.join('spec', 'fixtures', 'doc_sample.txt')))
+ @uploader.store!(fixture_file_upload(Rails.root.join('spec', 'fixtures', 'doc_sample.txt')))
expect(@uploader.image_or_video?).to be false
end