summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/controllers/account_controller_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-02-11 13:58:36 +0100
committerlain <lain@soykaf.club>2020-02-11 13:58:36 +0100
commit24c526a0b18b822ae339a481934bfa66b13bba54 (patch)
tree11d7c9bb2bf5503b536ee0ab72533974e9a7b21b /test/web/mastodon_api/controllers/account_controller_test.exs
parent57098713c02363aaee78d519726e6f2975f725d8 (diff)
parent2f1c61255ff95a1d21a751cb78da3c031ccdd692 (diff)
downloadpleroma-24c526a0b18b822ae339a481934bfa66b13bba54.tar.gz
pleroma-24c526a0b18b822ae339a481934bfa66b13bba54.zip
Merge remote-tracking branch 'origin/develop' into uguu-uwu-notices-bulge
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)