Merge branch 'refactor/following-relationships' into 'develop'
[akkoma] / test / web / mastodon_api / controllers / follow_request_controller_test.exs
index 913f8c03896875497743dbf1994863fe117978b3..288cd90298c97ed3c313dbd2be750896afeebb4b 100644 (file)
@@ -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)