user: do not allow refollowing somebody who has blocked a user
This commit is contained in:
parent
8d2ee70da1
commit
1d88abf2d4
2 changed files with 30 additions and 16 deletions
|
|
@ -46,6 +46,15 @@ defmodule Pleroma.UserTest do
|
|||
{:error, _} = User.follow(user, followed)
|
||||
end
|
||||
|
||||
test "can't follow a user who blocked us" do
|
||||
blocker = insert(:user)
|
||||
blockee = insert(:user)
|
||||
|
||||
{:ok, blocker} = User.block(blocker, blockee)
|
||||
|
||||
{:error, _} = User.follow(blockee, blocker)
|
||||
end
|
||||
|
||||
# This is a somewhat useless test.
|
||||
# test "following a remote user will ensure a websub subscription is present" do
|
||||
# user = insert(:user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue