diff options
author | Lain Soykaf <lain@lain.com> | 2023-01-05 11:29:06 -0500 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2023-02-20 12:21:04 -0500 |
commit | d5125e6ce75ee9c2cf54e5399625d7a94e313571 (patch) | |
tree | fec826387b7d46234f34aaea6a7a1c5df6f839f9 /test | |
parent | e8fca8882aa4d8c9fc5e9f27f625beca19205380 (diff) | |
download | pleroma-d5125e6ce75ee9c2cf54e5399625d7a94e313571.tar.gz pleroma-d5125e6ce75ee9c2cf54e5399625d7a94e313571.zip |
B StripLocation: Add test, work for all svgs.
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 |