summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api
diff options
context:
space:
mode:
authorkaniini <nenolod@gmail.com>2019-02-28 10:22:19 +0000
committerkaniini <nenolod@gmail.com>2019-02-28 10:22:19 +0000
commitcf426a719dfe26a11b0bf0a22a08fd45ca5b9dc2 (patch)
tree8a763742b6a7cef37fdcc7dfc3f12a17490b2dc8 /test/web/mastodon_api
parent90a24fbf950f9da80ff30259a9d54317a9d2662e (diff)
parentbbbdbec4fd8f14aa039d7f4a42215544cd6e4932 (diff)
downloadpleroma-cf426a719dfe26a11b0bf0a22a08fd45ca5b9dc2.tar.gz
pleroma-cf426a719dfe26a11b0bf0a22a08fd45ca5b9dc2.zip
Merge branch 'with-mutes' into 'develop'
Add `with_muted` param. Closes #683 See merge request pleroma/pleroma!872
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r--test/web/mastodon_api/status_view_test.exs16
1 files changed, 16 insertions, 0 deletions
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)