From ca3b4de2c9ed2c34d2d789e4b5e2c721c0d99f71 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Mon, 20 Jan 2020 20:04:25 +0300 Subject: [PATCH] [#1521] AdminApiControllerTest: fixed create report test (OAuth). --- test/web/admin_api/admin_api_controller_test.exs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.45.2