summaryrefslogtreecommitdiff
path: root/test/user_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/user_test.exs')
-rw-r--r--test/user_test.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/user_test.exs b/test/user_test.exs
index e11bade93..f41063e9c 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -45,4 +45,12 @@ defmodule Pleroma.UserTest do
assert user.following == []
end
+
+ test "test if a user is following another user" do
+ { :ok, followed } = UserBuilder.insert(%{nickname: "guy"})
+ { :ok, user } = UserBuilder.insert(%{following: [User.ap_followers(followed)]})
+
+ assert User.following?(user, followed)
+ refute User.following?(followed, user)
+ end
end