From 4196d9af111893e186bfedd8a03994cd02cf87a2 Mon Sep 17 00:00:00 2001 From: lain Date: Wed, 20 Feb 2019 14:14:52 +0100 Subject: [PATCH] Add test for User.mutes and so on. --- test/user_test.exs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/user_test.exs b/test/user_test.exs index 92991d063..0b1c39ecf 100644 --- a/test/user_test.exs +++ b/test/user_test.exs @@ -594,6 +594,29 @@ defmodule Pleroma.UserTest do end end + describe "mutes" do + test "it mutes people" do + user = insert(:user) + muted_user = insert(:user) + + refute User.mutes?(user, muted_user) + + {:ok, user} = User.mute(user, muted_user) + + assert User.mutes?(user, muted_user) + end + + test "it unmutes users" do + user = insert(:user) + muted_user = insert(:user) + + {:ok, user} = User.mute(user, muted_user) + {:ok, user} = User.unmute(user, muted_user) + + refute User.mutes?(user, muted_user) + end + end + describe "blocks" do test "it blocks people" do user = insert(:user) -- 2.45.2