[#3174] Refactoring: ConfigDB fetching functions, ConfigDB tests.

Minor fixes.
This commit is contained in:
Ivan Tashkinov 2020-12-06 18:02:30 +03:00
commit e00c667145
5 changed files with 96 additions and 181 deletions

View file

@ -162,7 +162,9 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
end
end
test "POST /api/pleroma/admin/config error", %{conn: conn} do
test "POST /api/pleroma/admin/config with configdb disabled", %{conn: conn} do
clear_config(:configurable_from_database, false)
conn =
conn
|> put_req_header("content-type", "application/json")

View file

@ -60,7 +60,7 @@ defmodule Pleroma.Web.AdminAPI.RelayControllerTest do
conn = get(conn, "/api/pleroma/admin/relay")
assert json_response_and_validate_schema(conn, 200)["relays"] == [
assert json_response_and_validate_schema(conn, 200)["relays"] |> Enum.sort() == [
%{
"actor" => "http://mastodon.example.org/users/admin",
"followed_back" => true