X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fadmin_api%2Fcontrollers%2Fconfig_controller_test.exs;h=75ca892aa769366ba90603d24ba2c67ace80d675;hb=f917285b72dbc770be40478e1a55973f29d5db7d;hp=4e897455f03bbc0b241fa04052898def8556639e;hpb=049ece1ef38f1aeb656a88ed1d15bf3d4a364e01;p=akkoma
diff --git a/test/pleroma/web/admin_api/controllers/config_controller_test.exs b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
index 4e897455f..75ca892aa 100644
--- a/test/pleroma/web/admin_api/controllers/config_controller_test.exs
+++ b/test/pleroma/web/admin_api/controllers/config_controller_test.exs
@@ -1,9 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
- use Pleroma.Web.ConnCase, async: true
+ use Pleroma.Web.ConnCase
import ExUnit.CaptureLog
import Pleroma.Factory
@@ -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")
@@ -1415,11 +1417,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
describe "GET /api/pleroma/admin/config/descriptions" do
test "structure", %{conn: conn} do
- admin = insert(:user, is_admin: true)
-
- conn =
- assign(conn, :user, admin)
- |> get("/api/pleroma/admin/config/descriptions")
+ conn = get(conn, "/api/pleroma/admin/config/descriptions")
assert [child | _others] = json_response_and_validate_schema(conn, 200)
@@ -1437,11 +1435,7 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
{:esshd}
])
- admin = insert(:user, is_admin: true)
-
- conn =
- assign(conn, :user, admin)
- |> get("/api/pleroma/admin/config/descriptions")
+ conn = get(conn, "/api/pleroma/admin/config/descriptions")
children = json_response_and_validate_schema(conn, 200)