diff options
author | Alex Gleason <alex@alexgleason.me> | 2020-07-14 18:56:40 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2020-07-14 18:56:40 -0500 |
commit | 48983e942139a81106416cfbb8d22743b6764053 (patch) | |
tree | 1c11c31848609a9e6b8226bc6ac77d3747e1986a /test/web/admin_api/controllers/config_controller_test.exs | |
parent | df3d1bf5e57389e41a70676ccab1df81d83e3d74 (diff) | |
parent | 3f65f2ea79644cd8a119fc154c2792994723c7cb (diff) | |
download | pleroma-48983e942139a81106416cfbb8d22743b6764053.tar.gz pleroma-48983e942139a81106416cfbb8d22743b6764053.zip |
Merge remote-tracking branch 'upstream/develop' into by-approval
Diffstat (limited to 'test/web/admin_api/controllers/config_controller_test.exs')
-rw-r--r-- | test/web/admin_api/controllers/config_controller_test.exs | 8 |
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 |