diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-09-04 10:39:08 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-04 10:39:08 +0000 |
commit | f9475e299c6f6b363d5ea302f1295a3ea0bf9adb (patch) | |
tree | cec2910cfe3c0065a88e884a60a588c548c0cae9 /spec/uploaders | |
parent | 0689900c7a5ce368c780f1fce8f465685bbfa9d6 (diff) | |
download | gitlab-ce-f9475e299c6f6b363d5ea302f1295a3ea0bf9adb.tar.gz |
Uploads to wiki stored inside the wiki git repository
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/uploader_helper_spec.rb | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/spec/uploaders/uploader_helper_spec.rb b/spec/uploaders/uploader_helper_spec.rb index 33da93cc9d0..fd6712d4645 100644 --- a/spec/uploaders/uploader_helper_spec.rb +++ b/spec/uploaders/uploader_helper_spec.rb @@ -11,27 +11,10 @@ describe UploaderHelper do example_uploader.new end - def upload_fixture(filename) - fixture_file_upload(File.join('spec', 'fixtures', filename)) - end - - describe '#image_or_video?' do - it 'returns true for an image file' do - uploader.store!(upload_fixture('dk.png')) - - expect(uploader).to be_image_or_video - end - - it 'it returns true for a video file' do - uploader.store!(upload_fixture('video_sample.mp4')) - - expect(uploader).to be_image_or_video - end - - it 'returns false for other extensions' do - uploader.store!(upload_fixture('doc_sample.txt')) - - expect(uploader).not_to be_image_or_video + describe '#extension_match?' do + it 'returns false if file does not exists' do + expect(uploader.file).to be_nil + expect(uploader.send(:extension_match?, 'jpg')).to eq false end end end |