Merge branch '1723-token-fixes' into 'develop'

AccountController: Return scope in proper format.

Closes #1723

See merge request pleroma/pleroma!2694
This commit is contained in:
lain 2020-07-09 13:10:05 +00:00
commit 8ca1f3e8c6
8 changed files with 56 additions and 68 deletions

View file

@ -937,7 +937,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
%{
"access_token" => token,
"created_at" => _created_at,
"scope" => _scope,
"scope" => ^scope,
"token_type" => "Bearer"
} = json_response_and_validate_schema(conn, 200)
@ -1099,7 +1099,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{
"access_token" => access_token,
"created_at" => _,
"scope" => ["read", "write", "follow", "push"],
"scope" => "read write follow push",
"token_type" => "Bearer"
} = response
@ -1217,7 +1217,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
assert %{
"access_token" => access_token,
"created_at" => _,
"scope" => ["read"],
"scope" => "read",
"token_type" => "Bearer"
} =
conn