diff options
| author | Lain Soykaf <lain@lain.com> | 2023-01-05 11:29:06 -0500 | 
|---|---|---|
| committer | Lain Soykaf <lain@lain.com> | 2023-01-05 11:29:06 -0500 | 
| commit | fe00fbfd548f0564170ac124e3d8b9574036c303 (patch) | |
| tree | 6bd87bfbb785577ebbe661a3e5590e2489f98bf6 /test | |
| parent | 5b4962165e2c5dd6350fbd7dcc342b9036a442b3 (diff) | |
| download | pleroma-fe00fbfd548f0564170ac124e3d8b9574036c303.tar.gz pleroma-fe00fbfd548f0564170ac124e3d8b9574036c303.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 | 
