Fix RSpec/AnyInstance
cop (#27810)
This commit is contained in:
parent
d562fb8459
commit
b2c5b20ef2
14 changed files with 70 additions and 60 deletions
|
@ -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