diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-16 16:14:50 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-05-16 16:14:50 +0300 |
commit | 978ccf8f974e7ee398faa3e5bfb7c081144e9325 (patch) | |
tree | 3905077d0fca58062ed206dbc383b03ae4a13553 /test/web/common_api/common_api_test.exs | |
parent | e4b12494d77e7a6920a408d62d5b8fe0f886a14d (diff) | |
parent | 3bc1138dd9beec03d2336fa1ad45dd23816f5285 (diff) | |
download | pleroma-978ccf8f974e7ee398faa3e5bfb7c081144e9325.tar.gz pleroma-978ccf8f974e7ee398faa3e5bfb7c081144e9325.zip |
Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 12 |
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) |