From a78ae2a685769cbf7459eb347aca581d389018ad Mon Sep 17 00:00:00 2001 From: Lain Iwakura Date: Thu, 7 Dec 2017 17:51:55 +0100 Subject: Don't follow deactivated users. --- test/user_test.exs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/user_test.exs b/test/user_test.exs index 6daf1ecb7..486998907 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -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") -- cgit v1.2.3