CommonAPI: Unblock a user even if we don't have an activity.
This commit is contained in:
parent
aeacfb2479
commit
2dcb26a6e5
2 changed files with 24 additions and 1 deletions
|
|
@ -23,6 +23,18 @@ defmodule Pleroma.Web.CommonAPITest do
|
|||
setup do: clear_config([:instance, :limit])
|
||||
setup do: clear_config([:instance, :max_pinned_statuses])
|
||||
|
||||
describe "unblocking" do
|
||||
test "it works even without an existing block activity" do
|
||||
blocked = insert(:user)
|
||||
blocker = insert(:user)
|
||||
User.block(blocker, blocked)
|
||||
|
||||
assert User.blocks?(blocker, blocked)
|
||||
assert {:ok, :no_activity} == CommonAPI.unblock(blocker, blocked)
|
||||
refute User.blocks?(blocker, blocked)
|
||||
end
|
||||
end
|
||||
|
||||
describe "deletion" do
|
||||
test "it works with pruned objects" do
|
||||
user = insert(:user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue