summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-09-15 18:22:08 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-09-15 18:22:08 +0300
commite6f43a831bdd2a381ed4de493344886f312f9a38 (patch)
treea6d0614a5cfba0f9f28bfeff343158a7f658fbe2 /test/web/mastodon_api/controllers
parentb63faf9819c2c49d2e9b63e7f37136eb03d8b4e8 (diff)
downloadpleroma-e6f43a831bdd2a381ed4de493344886f312f9a38.tar.gz
pleroma-e6f43a831bdd2a381ed4de493344886f312f9a38.zip
[#1234] Permissions-related fixes / new functionality (Masto 2.4.3 scopes).
Diffstat (limited to 'test/web/mastodon_api/controllers')
-rw-r--r--test/web/mastodon_api/controllers/mastodon_api_controller/update_credentials_test.exs5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/web/mastodon_api/controllers/mastodon_api_controller/update_credentials_test.exs b/test/web/mastodon_api/controllers/mastodon_api_controller/update_credentials_test.exs
index 87ee82050..1680ec122 100644
--- a/test/web/mastodon_api/controllers/mastodon_api_controller/update_credentials_test.exs
+++ b/test/web/mastodon_api/controllers/mastodon_api_controller/update_credentials_test.exs
@@ -257,7 +257,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
assert user_response["pleroma"]["background_image"]
end
- test "requires 'write' permission", %{conn: conn} do
+ test "requires 'write:accounts' permission", %{conn: conn} do
token1 = insert(:oauth_token, scopes: ["read"])
token2 = insert(:oauth_token, scopes: ["write", "follow"])
@@ -268,7 +268,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|> patch("/api/v1/accounts/update_credentials", %{})
if token == token1 do
- assert %{"error" => "Insufficient permissions: write."} == json_response(conn, 403)
+ assert %{"error" => "Insufficient permissions: write:accounts."} ==
+ json_response(conn, 403)
else
assert json_response(conn, 200)
end