mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 16:40:29 +00:00
[#1521] AdminApiControllerTest: fixed create report test (OAuth).
This commit is contained in:
parent
00d08c9231
commit
ca3b4de2c9
1 changed files with 4 additions and 4 deletions
|
@ -1363,9 +1363,9 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
test "requires write:reports scope", %{conn: conn, id: id, admin: admin} do
|
test "requires admin:write:reports scope", %{conn: conn, id: id, admin: admin} do
|
||||||
read_token = insert(:oauth_token, user: admin, scopes: ["read"])
|
read_token = insert(:oauth_token, user: admin, scopes: ["admin:read"])
|
||||||
write_token = insert(:oauth_token, user: admin, scopes: ["write:reports"])
|
write_token = insert(:oauth_token, user: admin, scopes: ["admin:write:reports"])
|
||||||
|
|
||||||
response =
|
response =
|
||||||
conn
|
conn
|
||||||
|
@ -1376,7 +1376,7 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
||||||
|> json_response(403)
|
|> json_response(403)
|
||||||
|
|
||||||
assert response == %{
|
assert response == %{
|
||||||
"error" => "Insufficient permissions: admin:write:reports | write:reports."
|
"error" => "Insufficient permissions: admin:write:reports."
|
||||||
}
|
}
|
||||||
|
|
||||||
conn
|
conn
|
||||||
|
|
Loading…
Reference in a new issue