aboutsummaryrefslogtreecommitdiff
path: root/test/pleroma
diff options
context:
space:
mode:
authorTusooa Zhu <tusooa@kazv.moe>2022-09-14 20:24:04 -0400
committerTusooa Zhu <tusooa@kazv.moe>2022-09-14 20:24:04 -0400
commitea60c4e7097c69df2023f23f60451f69668394f8 (patch)
tree10ef038f1cac4d9999276e403f39c26ce1a4402e /test/pleroma
parent9022d855cd08db104b3a52597e9c02a14b1bcb9a (diff)
downloadpleroma-ea60c4e7097c69df2023f23f60451f69668394f8.tar.gz
Fix wrong relationship direction
Diffstat (limited to 'test/pleroma')
-rw-r--r--test/pleroma/web/mastodon_api/controllers/account_controller_test.exs17
1 files changed, 16 insertions, 1 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 8311ebff9..b4e2a3081 100644
--- a/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/account_controller_test.exs
@@ -1985,7 +1985,22 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do
CommonAPI.follow(other_user, user)
- assert %{"id" => other_user_id, "followed_by" => false} =
+ assert %{"id" => ^other_user_id, "followed_by" => false} =
+ conn
+ |> post("/api/v1/accounts/#{other_user_id}/remove_from_followers")
+ |> json_response_and_validate_schema(200)
+
+ refute User.following?(other_user, user)
+ end
+
+ test "removing remote user from followers", %{conn: conn, user: user} do
+ %{id: other_user_id} = other_user = insert(:user, local: false)
+
+ CommonAPI.follow(other_user, user)
+
+ assert User.following?(other_user, user)
+
+ assert %{"id" => ^other_user_id, "followed_by" => false} =
conn
|> post("/api/v1/accounts/#{other_user_id}/remove_from_followers")
|> json_response_and_validate_schema(200)