From ebc32045f0e2d0baa47fb45f9bd4e6c8e3507b5d Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 11 Oct 2018 10:35:32 +0000 Subject: [PATCH] test: add regression test for #316 --- test/user_test.exs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/user_test.exs b/test/user_test.exs index 4b0f0739e..248c26a3d 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -55,6 +55,15 @@ defmodule Pleroma.UserTest do {:error, _} = User.follow(blockee, blocker) end + test "local users do not automatically follow local locked accounts" do + follower = insert(:user, info: %{"locked" => true}) + followed = insert(:user, info: %{"locked" => true}) + + {:ok, follower} = User.maybe_direct_follow(follower, followed) + + refute User.following?(follower, followed) + end + # This is a somewhat useless test. # test "following a remote user will ensure a websub subscription is present" do # user = insert(:user) -- 2.45.2