diff options
author | lain <lain@soykaf.club> | 2023-01-05 16:50:02 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2023-01-05 16:50:02 +0000 |
commit | 2a244b391d8c1d9d8e960532758110928cb5ef7c (patch) | |
tree | 6bd87bfbb785577ebbe661a3e5590e2489f98bf6 /test | |
parent | 51b4513258890e68294603f6f3dc432f12d2b383 (diff) | |
parent | fe00fbfd548f0564170ac124e3d8b9574036c303 (diff) | |
download | pleroma-2a244b391d8c1d9d8e960532758110928cb5ef7c.tar.gz pleroma-2a244b391d8c1d9d8e960532758110928cb5ef7c.zip |
Merge branch '2768-strip-location' into 'develop'
Resolve "Exiftool may conflict with SVG files"
Closes #2768
See merge request pleroma/pleroma!3829
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/upload/filter/exiftool/strip_location_test.exs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/test/pleroma/upload/filter/exiftool/strip_location_test.exs b/test/pleroma/upload/filter/exiftool/strip_location_test.exs index 7e1541f60..bcb5f3f60 100644 --- a/test/pleroma/upload/filter/exiftool/strip_location_test.exs +++ b/test/pleroma/upload/filter/exiftool/strip_location_test.exs @@ -31,12 +31,19 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripLocationTest do 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" - } - - assert Filter.Exiftool.StripLocation.filter(upload) == {:ok, :noop} + test "verify webp, heic, svg files are skipped" do + uploads = + ~w{webp heic svg svg+xml} + |> Enum.map(fn type -> + %Pleroma.Upload{ + name: "sample.#{type}", + content_type: "image/#{type}" + } + end) + + uploads + |> Enum.each(fn upload -> + assert Filter.Exiftool.StripLocation.filter(upload) == {:ok, :noop} + end) end end |