aboutsummaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-17 12:14:49 +0200
committerlain <lain@soykaf.club>2020-05-17 12:14:49 +0200
commit9c171097653abce49b9847fff66bc39b35719a1c (patch)
treee89ab9245f0844bfb3334f62f67f8ab9f0949580 /test/web/common_api/common_api_test.exs
parentf012c3a202ef43d1a8a1dc88f08057b7a41d3d78 (diff)
parentb0ccdb5af4baa119b336298d38f34746cdce0111 (diff)
downloadpleroma-9c171097653abce49b9847fff66bc39b35719a1c.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index 46ffd2888..353969885 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -98,6 +98,18 @@ defmodule Pleroma.Web.CommonAPITest do
end
end
+ 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)