StatusView: return quote post inside a reblog

This commit is contained in:
Alex Gleason 2022-01-28 12:33:07 -06:00 committed by tusooa
commit f8b420932e
No known key found for this signature in database
GPG key ID: 42AEC43D48433C51
2 changed files with 18 additions and 4 deletions

View file

@ -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)