X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmastodon_api%2Fstatus_view_test.exs;h=351dbf673e421c4549024a5cac1a4f84702dd72a;hb=9b63fda9c70f0fd3030ada951f3514221ae2e3aa;hp=3412a6be2e0c81550fc4f6ee397ebdd2b7e93f69;hpb=59c27f29c8315b3de97c35d260a038a3f09c1885;p=akkoma diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index 3412a6be2..351dbf673 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -126,6 +126,22 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert status == expected end + test "tells if the message is muted for some reason" do + user = insert(:user) + other_user = insert(:user) + + {:ok, user} = User.mute(user, other_user) + + {:ok, activity} = CommonAPI.post(other_user, %{"status" => "test"}) + status = StatusView.render("status.json", %{activity: activity}) + + assert status.muted == false + + status = StatusView.render("status.json", %{activity: activity, for: user}) + + assert status.muted == true + end + test "a reply" do note = insert(:note_activity) user = insert(:user)