uploads: factor out remaining image methods to MediaFile.

This commit is contained in:
evazion
2020-05-19 02:18:30 -05:00
parent 45064853de
commit 364343453c
7 changed files with 56 additions and 88 deletions

View File

@@ -843,7 +843,6 @@ class UploadServiceTest < ActiveSupport::TestCase
upload = upload_from_file(@bad_jpeg_path)
assert_match(/corrupt/, upload.status)
assert_equal(true, UploadService::Utils.corrupt?(@bad_jpeg_path))
end
should "fail for a corrupted gif" do
@@ -851,7 +850,6 @@ class UploadServiceTest < ActiveSupport::TestCase
upload = upload_from_file(@bad_gif_path)
assert_match(/corrupt/, upload.status)
assert_equal(true, UploadService::Utils.corrupt?(@bad_gif_path))
end
# https://schaik.com/pngsuite/pngsuite_xxx_png.html
@@ -860,7 +858,6 @@ class UploadServiceTest < ActiveSupport::TestCase
upload = upload_from_file(@bad_png_path)
assert_match(/corrupt/, upload.status)
assert_equal(true, UploadService::Utils.corrupt?(@bad_png_path))
end
end
end