Merge branch 'account-notes' into 'develop'
MastoAPI: Add user notes on accounts See merge request pleroma/pleroma!3540
This commit is contained in:
commit
73609211a4
12 changed files with 162 additions and 6 deletions
|
|
@ -1797,4 +1797,21 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
|
|||
|
||||
assert [%{"id" => ^id2}] = result
|
||||
end
|
||||
|
||||
test "create a note on a user" do
|
||||
%{conn: conn} = oauth_access(["write:accounts", "read:follows"])
|
||||
other_user = insert(:user)
|
||||
|
||||
conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/v1/accounts/#{other_user.id}/note", %{
|
||||
"comment" => "Example note"
|
||||
})
|
||||
|
||||
assert [%{"note" => "Example note"}] =
|
||||
conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> get("/api/v1/accounts/relationships?id=#{other_user.id}")
|
||||
|> json_response_and_validate_schema(200)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -274,7 +274,8 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
|
|||
requested: false,
|
||||
domain_blocking: false,
|
||||
showing_reblogs: true,
|
||||
endorsed: false
|
||||
endorsed: false,
|
||||
note: ""
|
||||
}
|
||||
|
||||
test "represent a relationship for the following and followed user" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue