diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-10-28 15:10:47 +0700 |
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-10-28 15:10:47 +0700 |
| commit | 42708610857dd4aea1f488a31c1690cd37797333 (patch) | |
| tree | 67b255a531530c21caaea86daae462b985a7bdea /test/web/mastodon_api/controllers | |
| parent | b777083f3f396a7d8c357ec968f72679befc691c (diff) | |
| parent | e80f90e9dbdb6955e355d6a06eb69ee7051ba6df (diff) | |
| download | pleroma-42708610857dd4aea1f488a31c1690cd37797333.tar.gz pleroma-42708610857dd4aea1f488a31c1690cd37797333.zip | |
Merge branch 'develop' into feature/move-activity
Diffstat (limited to 'test/web/mastodon_api/controllers')
| -rw-r--r-- | test/web/mastodon_api/controllers/account_controller_test.exs | 2 | ||||
| -rw-r--r-- | test/web/mastodon_api/controllers/follow_request_controller_test.exs | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs index 00c83fd7b..8fc2d9300 100644 --- a/test/web/mastodon_api/controllers/account_controller_test.exs +++ b/test/web/mastodon_api/controllers/account_controller_test.exs @@ -471,7 +471,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do conn = build_conn() - |> assign(:user, follower) + |> assign(:user, User.get_cached_by_id(follower.id)) |> post("/api/v1/accounts/#{followed.id}/follow?reblogs=true") assert %{"showing_reblogs" => true} = json_response(conn, 200) diff --git a/test/web/mastodon_api/controllers/follow_request_controller_test.exs b/test/web/mastodon_api/controllers/follow_request_controller_test.exs index 913f8c038..288cd9029 100644 --- a/test/web/mastodon_api/controllers/follow_request_controller_test.exs +++ b/test/web/mastodon_api/controllers/follow_request_controller_test.exs @@ -16,9 +16,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do other_user = insert(:user) {:ok, _activity} = ActivityPub.follow(other_user, user) - - user = User.get_cached_by_id(user.id) - other_user = User.get_cached_by_id(other_user.id) + {:ok, other_user} = User.follow(other_user, user, "pending") assert User.following?(other_user, user) == false @@ -36,6 +34,7 @@ defmodule Pleroma.Web.MastodonAPI.FollowRequestControllerTest do other_user = insert(:user) {:ok, _activity} = ActivityPub.follow(other_user, user) + {:ok, other_user} = User.follow(other_user, user, "pending") user = User.get_cached_by_id(user.id) other_user = User.get_cached_by_id(other_user.id) |
