summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2022-01-28 12:33:07 -0600
committertusooa <tusooa@kazv.moe>2023-09-13 19:19:04 -0400
commitcf8e4258830e3f362ab1e54238d622f6b2056502 (patch)
treea0232650b373ccbb8be7c248f7b18fe1c7884202 /test
parent93e4972b50f9bb0a07a7074fbab2aedbdc0cc4eb (diff)
downloadpleroma-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.exs12
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)