From: Ivan Tashkinov Date: Mon, 20 Jan 2020 17:04:25 +0000 (+0300) Subject: [#1521] AdminApiControllerTest: fixed create report test (OAuth). X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=ca3b4de2c9ed2c34d2d789e4b5e2c721c0d99f71;p=akkoma [#1521] AdminApiControllerTest: fixed create report test (OAuth). --- diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs index d11b26207..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