From d1cc9e4eaf7d361d9033aa4d823a8b9682d184ea Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Mon, 24 Jan 2022 19:03:10 +0100 Subject: Fix tests matching on "warn" Moving it to "warning" would break tests on 1.12.x --- test/pleroma/reverse_proxy_test.exs | 2 +- test/pleroma/web/common_api/utils_test.exs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/pleroma/reverse_proxy_test.exs b/test/pleroma/reverse_proxy_test.exs index a4dd8e99a..49ddf251d 100644 --- a/test/pleroma/reverse_proxy_test.exs +++ b/test/pleroma/reverse_proxy_test.exs @@ -130,7 +130,7 @@ test "max_body_length returns error if streaming body more than that option", %{ assert capture_log(fn -> ReverseProxy.call(conn, "/stream-bytes/50", max_body_length: 30) 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 diff --git a/test/pleroma/web/common_api/utils_test.exs b/test/pleroma/web/common_api/utils_test.exs index fc01f820a..7063b2503 100644 --- a/test/pleroma/web/common_api/utils_test.exs +++ b/test/pleroma/web/common_api/utils_test.exs @@ -309,7 +309,7 @@ test "when date is a binary in wrong format" do assert capture_log(fn -> 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 test "when date is a Unix timestamp" do @@ -319,7 +319,7 @@ test "when date is a Unix timestamp" do assert capture_log(fn -> 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 test "when date is nil" do @@ -327,13 +327,13 @@ test "when date is nil" do assert capture_log(fn -> 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 test "when date is a random string" do assert capture_log(fn -> 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 -- cgit v1.2.3