1
0
Fork 0
forked from gitea/nas

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

This commit is contained in:
KMY 2023-12-25 09:59:33 +09:00
commit 4355dfc64f
151 changed files with 1711 additions and 644 deletions

View file

@ -87,6 +87,7 @@ RSpec.describe ActivityPub::FetchFeaturedCollectionService, type: :service do
'https://example.com/account/pinned/unknown-inlined',
'https://example.com/account/pinned/unknown-reachable'
)
expect(actor.pinned_statuses).to_not include(known_status)
end
end

View file

@ -8,7 +8,6 @@ RSpec.describe ActivityPub::FetchRemoteStatusService, type: :service do
subject { described_class.new }
let!(:sender) { Fabricate(:account, domain: 'foo.bar', uri: 'https://foo.bar') }
let!(:recipient) { Fabricate(:account) }
let(:existing_status) { nil }

View file

@ -283,7 +283,7 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do
end
context 'when account is not suspended' do
subject { described_class.new.call('alice', 'example.com', payload) }
subject { described_class.new.call(account.username, account.domain, payload) }
let!(:account) { Fabricate(:account, username: 'alice', domain: 'example.com') }

View file

@ -242,7 +242,8 @@ RSpec.describe ActivityPub::ProcessCollectionService, type: :service do
it 'does not process forged payload' do
allow(ActivityPub::Activity).to receive(:factory)
subject.call(json, forwarder)
expect { subject.call(json, forwarder) }
.to_not change(actor.reload.statuses, :count)
expect(ActivityPub::Activity).to_not have_received(:factory).with(
hash_including(