diff options
author | lain <lain@soykaf.club> | 2020-07-27 16:35:47 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-27 16:35:47 +0000 |
commit | e1a1c8e7de5e10fa64d168dc5d35a80b96767395 (patch) | |
tree | c0057448e323c730bea2c76cecf9efb85ef14181 /test/web/admin_api/controllers/config_controller_test.exs | |
parent | 4a6389316dac53c1ca2ec36d160690476d881185 (diff) | |
parent | 2a3abfd326f0cbb588dfe66a23e9783be3038a5e (diff) | |
download | pleroma-e1a1c8e7de5e10fa64d168dc5d35a80b96767395.tar.gz pleroma-e1a1c8e7de5e10fa64d168dc5d35a80b96767395.zip |
Merge branch 'develop' into 'cleanup/masto_fe-default_settings'
# Conflicts:
# lib/pleroma/web/views/masto_fe_view.ex
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 |