summaryrefslogtreecommitdiff
path: root/test/web/admin_api/controllers/config_controller_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-08-05 19:16:48 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-08-05 19:16:48 +0300
commit4672b61106044c3772f58b02d39531b015ad8cca (patch)
tree0c0844bab5eae07265965b2b6dbd914afc55f9d6 /test/web/admin_api/controllers/config_controller_test.exs
parent3116a75e80144dff79232c8676bd28ed285a14d9 (diff)
parent7755f49e281e4990db5317b33d6b8e0d12982e0c (diff)
downloadpleroma-4672b61106044c3772f58b02d39531b015ad8cca.tar.gz
pleroma-4672b61106044c3772f58b02d39531b015ad8cca.zip
Merge branch 'develop' into command-available-check
Diffstat (limited to 'test/web/admin_api/controllers/config_controller_test.exs')
-rw-r--r--test/web/admin_api/controllers/config_controller_test.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/web/admin_api/controllers/config_controller_test.exs b/test/web/admin_api/controllers/config_controller_test.exs
index 064ef9bc7..61bc9fd39 100644
--- a/test/web/admin_api/controllers/config_controller_test.exs
+++ b/test/web/admin_api/controllers/config_controller_test.exs
@@ -152,6 +152,14 @@ defmodule Pleroma.Web.AdminAPI.ConfigControllerTest do
assert emoji_val[:groups] == [a: 1, b: 2]
assert assets_val[:mascots] == [a: 1, b: 2]
end
+
+ test "with valid `admin_token` query parameter, skips OAuth scopes check" do
+ clear_config([:admin_token], "password123")
+
+ build_conn()
+ |> get("/api/pleroma/admin/config?admin_token=password123")
+ |> json_response_and_validate_schema(200)
+ end
end
test "POST /api/pleroma/admin/config error", %{conn: conn} do