aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2021-11-21 17:50:42 +0100
committermarcin mikołajczak <git@mkljczk.pl>2021-11-21 17:51:00 +0100
commitcb76faece99c706685b71ad5a13943036b481645 (patch)
tree740362dbd2ab651e762d8415a45d7f3f066a3159
parent106b5c26781dd1e92b6cd820b3dff41a27a4c4d2 (diff)
downloadpleroma-cb76faece99c706685b71ad5a13943036b481645.tar.gz
Update test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
-rw-r--r--test/pleroma/web/mastodon_api/controllers/account_controller_test.exs19
1 files changed, 11 insertions, 8 deletions
diff --git a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
index 48e658dd2..4f855ac5c 100644
--- a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
@@ -1778,16 +1778,19 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
end
test "create a note on a user" do
- %{conn: conn} = oauth_access(["write:accounts"])
+ %{conn: conn} = oauth_access(["write:accounts", "read:follows"])
other_user = insert(:user)
- ret_conn =
- conn
- |> put_req_header("content-type", "application/json")
- |> post("/api/v1/accounts/#{other_user.id}/note", %{
- "comment" => "Example note"
- })
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/v1/accounts/#{other_user.id}/note", %{
+ "comment" => "Example note"
+ })
- assert %{"note" => "Example note"} = json_response_and_validate_schema(ret_conn, 200)
+ 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