diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-02-11 13:54:55 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-02-11 13:54:55 +0400 |
commit | 6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a (patch) | |
tree | dacb02d953473e3a0c6aeec58d86fb7fb1ed5886 /test/web/mastodon_api/controllers/account_controller_test.exs | |
parent | 3c4a30c6db312aff2afbfcd423498be19c02c68c (diff) | |
parent | 5ebffd5224729413e53a55ddda9a1f86224d7d73 (diff) | |
download | pleroma-6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a.tar.gz pleroma-6875ccb6bfcc5ae62db26d38c3d5eac4c6f8706a.zip |
Merge branch 'develop' into feature/new-registrations-digest
Diffstat (limited to 'test/web/mastodon_api/controllers/account_controller_test.exs')
-rw-r--r-- | test/web/mastodon_api/controllers/account_controller_test.exs | 11 |
1 files changed, 11 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 0d4860a42..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) @@ -668,6 +678,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do end test "rate limit", %{conn: conn} do + Pleroma.Config.put([Pleroma.Plugs.RemoteIp, :enabled], true) app_token = insert(:oauth_token, user: nil) conn = |