Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into test-warnings
This commit is contained in:
commit
e412363ff8
5 changed files with 21 additions and 9 deletions
|
|
@ -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"
|
||||
}
|
||||
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)
|
||||
|
||||
assert Filter.Exiftool.StripLocation.filter(upload) == {:ok, :noop}
|
||||
uploads
|
||||
|> Enum.each(fn upload ->
|
||||
assert Filter.Exiftool.StripLocation.filter(upload) == {:ok, :noop}
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -178,6 +178,10 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
|
|||
code = "https://github.com/pragdave/earmark/"
|
||||
{result, [], []} = Utils.format_input(code, "text/markdown")
|
||||
assert result == ~s[<p><a href="#{code}">#{code}</a></p>]
|
||||
|
||||
code = "https://github.com/~foo/bar"
|
||||
{result, [], []} = Utils.format_input(code, "text/markdown")
|
||||
assert result == ~s[<p><a href="#{code}">#{code}</a></p>]
|
||||
end
|
||||
|
||||
test "link with local mention" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue