summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2020-02-07 16:17:34 +0400
committerEgor Kislitsyn <egor@kislitsyn.com>2020-02-07 16:17:34 +0400
commitbc2e98b20099be767a8262b734c6702edea663b4 (patch)
tree980e849d7cd1cc42e07fc20090dd6c24644c567c /test/web/common_api/common_api_test.exs
parent2cc4fbab96376f0ca815f9be0cfad8e5ba1df7ce (diff)
downloadpleroma-bc2e98b20099be767a8262b734c6702edea663b4.tar.gz
pleroma-bc2e98b20099be767a8262b734c6702edea663b4.zip
Add User.get_follow_state/2
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index 7eff24ce4..a7b362525 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -544,11 +544,9 @@ defmodule Pleroma.Web.CommonAPITest do
assert {:ok, follower, followed, %{id: activity_id, data: %{"state" => "pending"}}} =
CommonAPI.follow(follower, followed)
- assert %{state: "pending"} = Pleroma.FollowingRelationship.get(follower, followed)
-
+ assert User.get_follow_state(follower, followed) == "pending"
assert {:ok, follower} = CommonAPI.unfollow(follower, followed)
-
- assert Pleroma.FollowingRelationship.get(follower, followed) == nil
+ assert User.get_follow_state(follower, followed) == nil
assert %{id: ^activity_id, data: %{"state" => "cancelled"}} =
Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(follower, followed)
@@ -568,11 +566,9 @@ defmodule Pleroma.Web.CommonAPITest do
assert {:ok, follower, followed, %{id: activity_id, data: %{"state" => "pending"}}} =
CommonAPI.follow(follower, followed)
- assert %{state: "pending"} = Pleroma.FollowingRelationship.get(follower, followed)
-
+ assert User.get_follow_state(follower, followed) == "pending"
assert {:ok, follower} = CommonAPI.unfollow(follower, followed)
-
- assert Pleroma.FollowingRelationship.get(follower, followed) == nil
+ assert User.get_follow_state(follower, followed) == nil
assert %{id: ^activity_id, data: %{"state" => "cancelled"}} =
Pleroma.Web.ActivityPub.Utils.fetch_latest_follow(follower, followed)