Update test
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
106b5c2678
commit
cb76faece9
1 changed files with 11 additions and 8 deletions
|
@ -1778,16 +1778,19 @@ test "getting a list of blocks" 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
|
||||
|
|
Loading…
Reference in a new issue