diff options
author | lain <lain@soykaf.club> | 2020-01-20 18:10:55 +0100 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-01-20 18:10:55 +0100 |
commit | 7d8b709d293064462256d9a6392f993232323a4d (patch) | |
tree | 9565cc8b0eae80ed40cae526a124a3cfa9e2edec /test/web/admin_api/admin_api_controller_test.exs | |
parent | 4c5b5f14dcec51cba8e86bcfcf2943ee9b49b0e4 (diff) | |
parent | ab36459464311389c2929ff1c48537889066a9f8 (diff) | |
download | pleroma-7d8b709d293064462256d9a6392f993232323a4d.tar.gz pleroma-7d8b709d293064462256d9a6392f993232323a4d.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into emoji-reaction-extensions
Diffstat (limited to 'test/web/admin_api/admin_api_controller_test.exs')
-rw-r--r-- | test/web/admin_api/admin_api_controller_test.exs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index 12077135c..c8f8ba310 100644 --- a/test/web/admin_api/admin_api_controller_test.exs +++ b/test/web/admin_api/admin_api_controller_test.exs @@ -1363,9 +1363,9 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do } end - test "requires write:reports scope", %{conn: conn, id: id, admin: admin} do - read_token = insert(:oauth_token, user: admin, scopes: ["read"]) - write_token = insert(:oauth_token, user: admin, scopes: ["write:reports"]) + test "requires admin:write:reports scope", %{conn: conn, id: id, admin: admin} do + read_token = insert(:oauth_token, user: admin, scopes: ["admin:read"]) + write_token = insert(:oauth_token, user: admin, scopes: ["admin:write:reports"]) response = conn @@ -1376,7 +1376,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do |> json_response(403) assert response == %{ - "error" => "Insufficient permissions: admin:write:reports | write:reports." + "error" => "Insufficient permissions: admin:write:reports." } conn @@ -2864,7 +2864,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do response = json_response(ret_conn, 200) - assert length(response) == 0 + assert Enum.empty?(response) end end |