Verify webp files are not processed with exiftool
[akkoma] / test / upload / filter / exiftool_test.exs
index 094253a25d3b5374699022befce1d14bd4768c1c..fe24036d93411b46532a9d9d1eb63c250a42f149 100644 (file)
@@ -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