Replace user.following with Pleroma.FollowingRelationship
This commit is contained in:
parent
2c7ff32e5b
commit
059005ff82
28 changed files with 275 additions and 235 deletions
|
|
@ -457,7 +457,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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue