diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-08 19:59:37 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-08 19:59:37 +0300 |
commit | 4e6bbdc7b549e630141cb10d383a42055f06dc16 (patch) | |
tree | d0675328c7fc75f612eab779289afabee27a40a8 /test/web/mastodon_api/controllers/account_controller_test.exs | |
parent | d458f4fdcafe847a7db8b1c663cfd945019816b7 (diff) | |
parent | 964b4d82a0cde5b552b6210400c5e2c747a2f0e0 (diff) | |
download | pleroma-4e6bbdc7b549e630141cb10d383a42055f06dc16.tar.gz pleroma-4e6bbdc7b549e630141cb10d383a42055f06dc16.zip |
Merge remote-tracking branch 'remotes/origin/develop' into 1505-threads-federation
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller_test.exs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs index ec1e18002..e2abcd7c5 100644 --- a/test/web/mastodon_api/controllers/account_controller_test.exs +++ b/test/web/mastodon_api/controllers/account_controller_test.exs @@ -457,6 +457,16 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do assert id == to_string(other_user.id) end + test "cancelling follow request", %{conn: conn} do + %{id: other_user_id} = insert(:user, %{locked: true}) + + assert %{"id" => ^other_user_id, "following" => false, "requested" => true} = + conn |> post("/api/v1/accounts/#{other_user_id}/follow") |> json_response(:ok) + + assert %{"id" => ^other_user_id, "following" => false, "requested" => false} = + conn |> post("/api/v1/accounts/#{other_user_id}/unfollow") |> json_response(:ok) + end + test "following without reblogs" do %{conn: conn} = oauth_access(["follow", "read:statuses"]) followed = insert(:user) |