This commit is contained in:
Tusooa Zhu 2021-12-17 16:52:50 -05:00
parent 538d5ac210
commit 8376e83f61
No known key found for this signature in database
GPG Key ID: 7B467EDE43A08224
1 changed files with 4 additions and 1 deletions

View File

@ -586,9 +586,11 @@ test "", %{user: user, followed: followed, reject: reject} do
# Mock a local-to-remote follow # Mock a local-to-remote follow
{:ok, follow_data, []} = Builder.follow(user, followed) {:ok, follow_data, []} = Builder.follow(user, followed)
follow_data = follow_data =
follow_data follow_data
|> Map.put("state", "accept") |> Map.put("state", "accept")
{:ok, follow, _meta} = ActivityPub.persist(follow_data, local: true) {:ok, follow, _meta} = ActivityPub.persist(follow_data, local: true)
{:ok, _, _} = SideEffects.handle(follow) {:ok, _, _} = SideEffects.handle(follow)
@ -613,7 +615,8 @@ test "", %{user: user, followed: followed, reject: reject} do
refute User.following?(user, followed) refute User.following?(user, followed)
refute Pleroma.FollowingRelationship.get(user, followed) refute Pleroma.FollowingRelationship.get(user, followed)
assert Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(user, followed).data["state"] == "reject" assert Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(user, followed).data["state"] ==
"reject"
assert User.get_follow_state(user, followed) == nil assert User.get_follow_state(user, followed) == nil
assert User.get_follow_state(user, followed, nil) == nil assert User.get_follow_state(user, followed, nil) == nil