|
|
@ -30,4 +30,15 @@ defmodule Pleroma.Upload.Filter.ExiftoolTest do
|
|
|
|
assert String.match?(exif_original, ~r/GPS/)
|
|
|
|
assert String.match?(exif_original, ~r/GPS/)
|
|
|
|
refute String.match?(exif_filtered, ~r/GPS/)
|
|
|
|
refute String.match?(exif_filtered, ~r/GPS/)
|
|
|
|
end
|
|
|
|
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
|
|
|
|
end
|
|
|
|