Merge remote-tracking branch 'parent/main' into upstream-20231116
This commit is contained in:
commit
24371d6b2a
87 changed files with 566 additions and 347 deletions
|
@ -11,7 +11,8 @@ describe ActivityPub::DeliveryWorker do
|
|||
let(:payload) { 'test' }
|
||||
|
||||
before do
|
||||
allow_any_instance_of(Account).to receive(:remote_followers_hash).with('https://example.com/api').and_return('somehash')
|
||||
allow(sender).to receive(:remote_followers_hash).with('https://example.com/api').and_return('somehash')
|
||||
allow(Account).to receive(:find).with(sender.id).and_return(sender)
|
||||
end
|
||||
|
||||
describe 'perform' do
|
||||
|
|
|
@ -23,8 +23,8 @@ describe Web::PushNotificationWorker do
|
|||
|
||||
describe 'perform' do
|
||||
before do
|
||||
allow_any_instance_of(subscription.class).to receive(:contact_email).and_return(contact_email)
|
||||
allow_any_instance_of(subscription.class).to receive(:vapid_key).and_return(vapid_key)
|
||||
allow(subscription).to receive_messages(contact_email: contact_email, vapid_key: vapid_key)
|
||||
allow(Web::PushSubscription).to receive(:find).with(subscription.id).and_return(subscription)
|
||||
allow(Webpush::Encryption).to receive(:encrypt).and_return(payload)
|
||||
allow(JWT).to receive(:encode).and_return('jwt.encoded.payload')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue