aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-04 17:50:16 -0500
committerrinpatch <rinpatch@sdf.org>2020-09-08 12:29:38 +0300
commit3a98960c2684229435c5d04e4f3e0611098ceea2 (patch)
treedb5f03cad9440ca45d9e71658b0fdb446b92b09c /test
parent2165a249744a1ad4386a9d237871abe88e298942 (diff)
downloadpleroma-3a98960c2684229435c5d04e4f3e0611098ceea2.tar.gz
Verify webp files are not processed with exiftool
Diffstat (limited to 'test')
-rw-r--r--test/upload/filter/exiftool_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/upload/filter/exiftool_test.exs b/test/upload/filter/exiftool_test.exs
index 094253a25..fe24036d9 100644
--- a/test/upload/filter/exiftool_test.exs
+++ b/test/upload/filter/exiftool_test.exs
@@ -30,4 +30,15 @@ defmodule Pleroma.Upload.Filter.ExiftoolTest do
assert String.match?(exif_original, ~r/GPS/)
refute String.match?(exif_filtered, ~r/GPS/)
end
+
+ test "verify webp files are skipped" do
+ upload = %Pleroma.Upload{
+ name: "sample.webp",
+ content_type: "image/webp",
+ path: Path.absname("/dev/null"),
+ tempfile: Path.absname("/dev/null")
+ }
+
+ assert Filter.Exiftool.filter(upload) == {:ok, :noop}
+ end
end