Don't follow deactivated users.

This commit is contained in:
Lain Iwakura 2017-12-07 17:51:55 +01:00
commit a78ae2a685
2 changed files with 9 additions and 2 deletions

View file

@ -39,6 +39,13 @@ defmodule Pleroma.UserTest do
assert User.ap_followers(followed) in user.following
end
test "can't follow a deactivated users" do
user = insert(:user)
followed = insert(:user, info: %{"deactivated" => true})
{:error, _} = User.follow(user, followed)
end
test "following a remote user will ensure a websub subscription is present" do
user = insert(:user)
{:ok, followed} = OStatus.make_user("shp@social.heldscal.la")