diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-09-05 11:30:41 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-09-05 11:30:41 +0300 |
commit | 79cf629e1a3610a93f5b9349c18a4464eb859d3d (patch) | |
tree | 2644e0a58d11de74c350f4557778110d744b9441 /test/web/mastodon_api | |
parent | eb17cc17a146471d3774fc2b972128dd75eb05af (diff) | |
parent | 3e30f6e19824dc90717fc0929feddb24220a89ab (diff) | |
download | pleroma-79cf629e1a3610a93f5b9349c18a4464eb859d3d.tar.gz pleroma-79cf629e1a3610a93f5b9349c18a4464eb859d3d.zip |
Merge remote-tracking branch 'remotes/upstream/develop' into 1149-oban-job-queue
Diffstat (limited to 'test/web/mastodon_api')
-rw-r--r-- | test/web/mastodon_api/views/status_view_test.exs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index 1b6beb6d2..90451cbdc 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -150,7 +150,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do content: %{"text/plain" => HtmlSanitizeEx.strip_tags(object_data["content"])}, spoiler_text: %{"text/plain" => HtmlSanitizeEx.strip_tags(object_data["summary"])}, expires_at: nil, - direct_conversation_id: nil + direct_conversation_id: nil, + thread_muted: false } } @@ -173,6 +174,24 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert status.muted == true end + test "tells if the message is thread muted" 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, for: user}) + + assert status.pleroma.thread_muted == false + + {:ok, activity} = CommonAPI.add_mute(user, activity) + + status = StatusView.render("status.json", %{activity: activity, for: user}) + + assert status.pleroma.thread_muted == true + end + test "tells if the status is bookmarked" do user = insert(:user) |