summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorRoman Chvanikov <chvanikoff@pm.me>2020-09-20 20:51:20 +0300
committerRoman Chvanikov <chvanikoff@pm.me>2020-09-20 20:58:17 +0300
commit28d0986f839651df7d305da8932f7b5c48a4fbfb (patch)
tree90f6e7d772246e0751c0c8d8a3cce101c52b45b6 /test/web/common_api/common_api_test.exs
parent4987ee6256c4227793240c74043845a661e3d37b (diff)
downloadpleroma-28d0986f839651df7d305da8932f7b5c48a4fbfb.tar.gz
pleroma-28d0986f839651df7d305da8932f7b5c48a4fbfb.zip
Refactor mutes removing in CommonAPI and User
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index bf4353a57..45ab1e0bd 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -913,6 +913,12 @@ defmodule Pleroma.Web.CommonAPITest do
refute CommonAPI.thread_muted?(user, activity)
end
+ test "remove mute by ids", %{user: user, activity: activity} do
+ CommonAPI.add_mute(user, activity)
+ {:ok, _} = CommonAPI.remove_mute(user.id, activity.id)
+ refute CommonAPI.thread_muted?(user, activity)
+ end
+
test "check that mutes can't be duplicate", %{user: user, activity: activity} do
CommonAPI.add_mute(user, activity)
{:error, _} = CommonAPI.add_mute(user, activity)