summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-05-18 11:56:27 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-05-18 11:56:27 +0300
commit01bd6a1e54c8734e8965f153a9406cecc07950f3 (patch)
tree791348626f54b390167693da8c1a6481c54d78de /test/web/common_api/common_api_test.exs
parent8a383707ae143ba47fa1ba68da20bc6bec425126 (diff)
parent1199cf3a788334cd3fdb968d9f736e43c1401da1 (diff)
downloadpleroma-01bd6a1e54c8734e8965f153a9406cecc07950f3.tar.gz
pleroma-01bd6a1e54c8734e8965f153a9406cecc07950f3.zip
Merge branch 'develop' into feature/admin-api-status-count-per-instance
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 26e41c313..fd8299013 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -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)