Merge branch 'fix-tests-warn' into 'develop'

Fix tests matching on "warn"

See merge request pleroma/pleroma!3629
This commit is contained in:
Alex Gleason 2022-02-02 19:57:03 +00:00
commit 60deddb7e5
3 changed files with 6 additions and 5 deletions

View file

@ -130,7 +130,7 @@ defmodule Pleroma.ReverseProxyTest do
assert capture_log(fn -> assert capture_log(fn ->
ReverseProxy.call(conn, "/stream-bytes/50", max_body_length: 30) ReverseProxy.call(conn, "/stream-bytes/50", max_body_length: 30)
end) =~ end) =~
"[warn] Elixir.Pleroma.ReverseProxy request to /stream-bytes/50 failed while reading/chunking: :body_too_large" "Elixir.Pleroma.ReverseProxy request to /stream-bytes/50 failed while reading/chunking: :body_too_large"
end end
end end

View file

@ -309,7 +309,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
assert capture_log(fn -> assert capture_log(fn ->
assert Utils.date_to_asctime(date) == expected assert Utils.date_to_asctime(date) == expected
end) =~ "[warn] Date #{date} in wrong format, must be ISO 8601" end) =~ "Date #{date} in wrong format, must be ISO 8601"
end end
test "when date is a Unix timestamp" do test "when date is a Unix timestamp" do
@ -319,7 +319,7 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
assert capture_log(fn -> assert capture_log(fn ->
assert Utils.date_to_asctime(date) == expected assert Utils.date_to_asctime(date) == expected
end) =~ "[warn] Date #{date} in wrong format, must be ISO 8601" end) =~ "Date #{date} in wrong format, must be ISO 8601"
end end
test "when date is nil" do test "when date is nil" do
@ -327,13 +327,13 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
assert capture_log(fn -> assert capture_log(fn ->
assert Utils.date_to_asctime(nil) == expected assert Utils.date_to_asctime(nil) == expected
end) =~ "[warn] Date in wrong format, must be ISO 8601" end) =~ "Date in wrong format, must be ISO 8601"
end end
test "when date is a random string" do test "when date is a random string" do
assert capture_log(fn -> assert capture_log(fn ->
assert Utils.date_to_asctime("foo") == "" assert Utils.date_to_asctime("foo") == ""
end) =~ "[warn] Date foo in wrong format, must be ISO 8601" end) =~ "Date foo in wrong format, must be ISO 8601"
end end
end end

View file

@ -177,6 +177,7 @@ defmodule Pleroma.Web.MastodonAPI.FilterControllerTest do
assert response["whole_word"] == true assert response["whole_word"] == true
end end
@tag :erratic
test "with adding expires_at", %{conn: conn, user: user} do test "with adding expires_at", %{conn: conn, user: user} do
filter = insert(:filter, user: user) filter = insert(:filter, user: user)
in_seconds = 600 in_seconds = 600