Tighten rich media backfill stream test

This commit is contained in:
Lain Soykaf 2026-05-25 14:08:07 +04:00
commit cdb0f103a8
No known key found for this signature in database

View file

@ -74,9 +74,12 @@ defmodule Pleroma.Web.RichMedia.BackfillTest do
|> expect(:put, fn :rich_media_cache, _, _ -> {:ok, true} end) |> expect(:put, fn :rich_media_cache, _, _ -> {:ok, true} end)
Pleroma.Web.ActivityPub.ActivityPubMock Pleroma.Web.ActivityPub.ActivityPubMock
|> expect(:stream_out, fn _ -> :ok end) |> expect(:stream_out, fn %Pleroma.Activity{id: id} ->
assert id == activity.id
:ok
end)
Backfill.run(%{"url" => url, "activity_id" => "#{activity.data["id"]}", "stream" => true}) Backfill.run(%{"url" => url, "activity_id" => activity.id, "stream" => true})
end end
test "does not stream out update when stream == false" do test "does not stream out update when stream == false" do