1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.ThreadMuteTest do
7 import Pleroma.Web.ThreadMute
11 describe "mute tests" do
13 user = insert(:user, %{id: "1"})
16 insert(:note_activity, %{
18 "context" => "http://localhost:4000/contexts/361ca23e-ffa7-4773-b981-a355a18dc592"
22 [user: user, activity: activity]
25 test "add mute", %{user: user, activity: activity} do
27 {:ok, mute} = add_mute(user, id)
29 assert mute.user_id == "1"
30 assert mute.context == "http://localhost:4000/contexts/361ca23e-ffa7-4773-b981-a355a18dc592"
33 test "remove mute", %{user: user, activity: activity} do
37 {1, nil} = remove_mute(user, id)