diff options
author | Alex Gleason <alex@alexgleason.me> | 2022-01-28 12:33:07 -0600 |
---|---|---|
committer | tusooa <tusooa@kazv.moe> | 2023-09-13 19:19:04 -0400 |
commit | cf8e4258830e3f362ab1e54238d622f6b2056502 (patch) | |
tree | a0232650b373ccbb8be7c248f7b18fe1c7884202 /test | |
parent | 93e4972b50f9bb0a07a7074fbab2aedbdc0cc4eb (diff) | |
download | pleroma-cf8e4258830e3f362ab1e54238d622f6b2056502.tar.gz pleroma-cf8e4258830e3f362ab1e54238d622f6b2056502.zip |
StatusView: return quote post inside a reblog
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/mastodon_api/views/status_view_test.exs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pleroma/web/mastodon_api/views/status_view_test.exs b/test/pleroma/web/mastodon_api/views/status_view_test.exs index ed0a87558..6d3a72970 100644 --- a/test/pleroma/web/mastodon_api/views/status_view_test.exs +++ b/test/pleroma/web/mastodon_api/views/status_view_test.exs @@ -491,6 +491,18 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do refute status.pleroma.quote_visible end + test "repost of quote post" do + post = insert(:note_activity) + user = insert(:user) + + {:ok, quote_post} = CommonAPI.post(user, %{status: "he", quote_id: post.id}) + {:ok, repost} = CommonAPI.repeat(quote_post.id, user) + + [status] = StatusView.render("index.json", %{activities: [repost], as: :activity}) + + assert status.reblog.pleroma.quote.id == to_string(post.id) + end + test "contains mentions" do user = insert(:user) mentioned = insert(:user) |