Tweaks to clear_config calls in tests in order to prevent side effects on config during test suite execution.

This commit is contained in:
Ivan Tashkinov 2020-02-13 21:55:47 +03:00
commit 4f8c3462a8
31 changed files with 87 additions and 117 deletions

View file

@ -1890,9 +1890,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
end
test "when configuration from database is off", %{conn: conn} do
initial = Pleroma.Config.get(:configurable_from_database)
Pleroma.Config.put(:configurable_from_database, false)
on_exit(fn -> Pleroma.Config.put(:configurable_from_database, initial) end)
conn = get(conn, "/api/pleroma/admin/config")
assert json_response(conn, 400) ==