ConfigControllerTest: Fix it!

This commit is contained in:
Lain Soykaf 2025-02-25 17:18:49 +04:00
parent c31fabdebd
commit fd128ec7c2

View file

@ -1211,8 +1211,6 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
end end
test "args for Pleroma.Upload.Filter.Mogrify with custom tuples", %{conn: conn} do test "args for Pleroma.Upload.Filter.Mogrify with custom tuples", %{conn: conn} do
clear_config(Pleroma.Upload.Filter.Mogrify)
assert conn assert conn
|> put_req_header("content-type", "application/json") |> put_req_header("content-type", "application/json")
|> post("/api/pleroma/admin/config", %{ |> post("/api/pleroma/admin/config", %{
@ -1240,7 +1238,8 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
"need_reboot" => false "need_reboot" => false
} }
assert Config.get(Pleroma.Upload.Filter.Mogrify) == [args: ["auto-orient", "strip"]] config = Config.get(Pleroma.Upload.Filter.Mogrify)
assert {:args, ["auto-orient", "strip"]} in config
assert conn assert conn
|> put_req_header("content-type", "application/json") |> put_req_header("content-type", "application/json")
@ -1289,9 +1288,9 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
"need_reboot" => false "need_reboot" => false
} }
assert Config.get(Pleroma.Upload.Filter.Mogrify) == [ config = Config.get(Pleroma.Upload.Filter.Mogrify)
args: ["auto-orient", "strip", {"implode", "1"}, {"resize", "3840x1080>"}]
] assert {:args, ["auto-orient", "strip", {"implode", "1"}, {"resize", "3840x1080>"}]} in config
end end
test "enables the welcome messages", %{conn: conn} do test "enables the welcome messages", %{conn: conn} do