Add spec for AccountController.update_credentials
This commit is contained in:
parent
f80116125f
commit
260cbddc94
8 changed files with 229 additions and 16 deletions
|
|
@ -14,6 +14,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
|||
|
||||
describe "updating credentials" do
|
||||
setup do: oauth_access(["write:accounts"])
|
||||
setup :request_content_type
|
||||
|
||||
test "sets user settings in a generic way", %{conn: conn} do
|
||||
res_conn =
|
||||
|
|
@ -237,6 +238,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController.UpdateCredentialsTest do
|
|||
for token <- [token1, token2] do
|
||||
conn =
|
||||
build_conn()
|
||||
|> put_req_header("content-type", "multipart/form-data")
|
||||
|> put_req_header("authorization", "Bearer #{token.token}")
|
||||
|> patch("/api/v1/accounts/update_credentials", %{})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue