fix: Facebook reauthorization mailer (#4695)
This commit is contained in:
@@ -37,7 +37,7 @@ describe ::Messages::Facebook::MessageBuilder do
|
||||
allow(fb_object).to receive(:get_object).and_raise(Koala::Facebook::AuthenticationError.new(500, 'Error validating access token'))
|
||||
message_builder
|
||||
|
||||
expect(facebook_channel.authorization_error_count).to eq(1)
|
||||
expect(facebook_channel.authorization_error_count).to eq(2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,9 +22,11 @@ RSpec.describe Channel::FacebookPage do
|
||||
it 'calls channel notifier mail for facebook' do
|
||||
admin_mailer = double
|
||||
mailer_double = double
|
||||
|
||||
expect(AdministratorNotifications::ChannelNotificationsMailer).to receive(:with).and_return(admin_mailer)
|
||||
expect(admin_mailer).to receive(:facebook_disconnect).with(channel.inbox).and_return(mailer_double)
|
||||
expect(mailer_double).to receive(:deliver_later)
|
||||
|
||||
channel.prompt_reauthorization!
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user