Add a failing test
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl> Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
8f9a139ba1
commit
0b8b98f979
2 changed files with 28 additions and 0 deletions
1
changelog.d/fix-lists-bcc.fix
Normal file
1
changelog.d/fix-lists-bcc.fix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Fix publisher when publishing to a list of users
|
||||||
|
|
@ -332,6 +332,33 @@ defmodule Pleroma.Web.ActivityPub.PublisherTest do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "activity with BCC is published to a list member." do
|
||||||
|
actor = insert(:user)
|
||||||
|
{:ok, list} = Pleroma.List.create("list", actor)
|
||||||
|
list_member = insert(:user, %{local: false})
|
||||||
|
|
||||||
|
Pleroma.List.follow(list, list_member)
|
||||||
|
|
||||||
|
note_activity =
|
||||||
|
insert(:note_activity,
|
||||||
|
# recipients: [follower.ap_id],
|
||||||
|
data_attrs: %{"bcc" => [list.ap_id]}
|
||||||
|
)
|
||||||
|
|
||||||
|
res = Publisher.publish(actor, note_activity)
|
||||||
|
assert res == :ok
|
||||||
|
|
||||||
|
assert_enqueued(
|
||||||
|
worker: "Pleroma.Workers.PublisherWorker",
|
||||||
|
args: %{
|
||||||
|
"params" => %{
|
||||||
|
inbox: list_member.inbox,
|
||||||
|
activity_id: note_activity.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
test "publishes a delete activity to peers who signed fetch requests to the create acitvity/object." do
|
test "publishes a delete activity to peers who signed fetch requests to the create acitvity/object." do
|
||||||
fetcher =
|
fetcher =
|
||||||
insert(:user,
|
insert(:user,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue