test/mastodon_api/status: insert mute before testing unmute

Currently the test is still correctly sensitive to the visibility issue
it wants to test, but it easy to see how this could chane in the future
if it starts considering whether a mute existed in the first place.
Inserting a mute first ensures the test will keep working as intended.
This commit is contained in:
Oneric 2025-12-24 00:00:00 +00:00
parent b50028cf73
commit be7ce02295

View File

@ -1867,6 +1867,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
test "cannot unmute not visible conversation", %{user: user} do
{:ok, activity} = CommonAPI.post(user, %{status: "Invisible!", visibility: "private"})
{:ok, _} = Pleroma.ThreadMute.add_mute(user.id, activity.data["context"])
%{conn: conn} = oauth_access(["write:mutes"])
assert conn