Merge remote-tracking branch 'parent/main' into upstream-20240624

This commit is contained in:
KMY 2024-06-24 08:38:12 +09:00
commit af2727387e
88 changed files with 703 additions and 597 deletions

View file

@ -16,7 +16,7 @@ describe ActivityPub::DistributePollUpdateWorker do
end
it 'delivers to followers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com']]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Update'), account.id, 'http://example.com']]) do
subject.perform(status.id)
end
end

View file

@ -19,7 +19,7 @@ describe ActivityPub::DistributionWorker do
end
it 'delivers to followers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Create'), status.account.id, 'http://example.com', anything]]) do
subject.perform(status.id)
end
end
@ -43,7 +43,7 @@ describe ActivityPub::DistributionWorker do
end
it 'delivers to followers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Create'), status.account.id, 'http://example.com', anything]]) do
subject.perform(status.id)
end
end
@ -104,7 +104,7 @@ describe ActivityPub::DistributionWorker do
end
it 'delivers to mentioned accounts' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'https://foo.bar/inbox', anything]]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Create'), status.account.id, 'https://foo.bar/inbox', anything]]) do
subject.perform(status.id)
end
end

View file

@ -16,12 +16,16 @@ describe ActivityPub::MoveDistributionWorker do
end
it 'delivers to followers and known blockers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [
[kind_of(String), migration.account.id, 'http://example.com'],
[kind_of(String), migration.account.id, 'http://example2.com'],
]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, expected_migration_deliveries) do
subject.perform(migration.id)
end
end
def expected_migration_deliveries
[
[match_json_values(type: 'Move'), migration.account.id, 'http://example.com'],
[match_json_values(type: 'Move'), migration.account.id, 'http://example2.com'],
]
end
end
end

View file

@ -25,7 +25,7 @@ describe ActivityPub::StatusUpdateDistributionWorker do
end
it 'delivers to followers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Update'), status.account.id, 'http://example.com', anything]]) do
subject.perform(status.id)
end
end
@ -49,7 +49,7 @@ describe ActivityPub::StatusUpdateDistributionWorker do
end
it 'delivers to followers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), status.account.id, 'http://example.com', anything]]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Update'), status.account.id, 'http://example.com', anything]]) do
subject.perform(status.id)
end
end

View file

@ -14,7 +14,7 @@ describe ActivityPub::UpdateDistributionWorker do
end
it 'delivers to followers' do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[kind_of(String), account.id, 'http://example.com', anything]]) do
expect_push_bulk_to_match(ActivityPub::DeliveryWorker, [[match_json_values(type: 'Update'), account.id, 'http://example.com', anything]]) do
subject.perform(account.id)
end
end