script_test: Fix %ErlangError for Elixir 1.14

This commit is contained in:
Haelwenn (lanodan) Monnier 2022-09-02 21:12:02 +02:00
parent 915c7319c6
commit f2221d539c

View File

@ -10,11 +10,14 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.ScriptTest do
test "it logs error when script is not found" do test "it logs error when script is not found" do
assert capture_log(fn -> assert capture_log(fn ->
assert Invalidation.Script.purge( assert {:error, msg} =
["http://example.com/media/example.jpg"], Invalidation.Script.purge(
script_path: "./example" ["http://example.com/media/example.jpg"],
) == {:error, "%ErlangError{original: :enoent}"} script_path: "./example"
end) =~ "Error while cache purge: %ErlangError{original: :enoent}" )
assert msg =~ ~r/%ErlangError{original: :enoent(, reason: nil)?}/
end) =~ ~r/Error while cache purge: %ErlangError{original: :enoent(, reason: nil)?}/
capture_log(fn -> capture_log(fn ->
assert Invalidation.Script.purge( assert Invalidation.Script.purge(