summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller_test.exs
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-02-10 20:49:20 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-02-10 20:49:20 +0300
commit6813c0302c2b665d337d5f5831d2df6312b6b277 (patch)
tree8c9333eeff70c799ecd30e6589f3cbebd8adbf5c /test/web/mastodon_api/controllers/account_controller_test.exs
parent2c40c8b4a2890e60abe8d67a3c8af4a88d225b60 (diff)
parent544bdbfb90d764a5aba8ed07c13b842838d76d73 (diff)
downloadpleroma-6813c0302c2b665d337d5f5831d2df6312b6b277.tar.gz
pleroma-6813c0302c2b665d337d5f5831d2df6312b6b277.zip
Merge branch 'develop' into issue/1383
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r--test/web/mastodon_api/controllers/account_controller_test.exs10
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)