fix: Handle PermissionDeniedError for Dialogflow processor (#8252)

This commit is contained in:
Pranav Raj S
2023-10-30 13:24:03 -07:00
committed by GitHub
parent 013dab7da6
commit 653e0335c0
8 changed files with 82 additions and 20 deletions

View File

@@ -25,6 +25,22 @@ RSpec.describe AdministratorNotifications::ChannelNotificationsMailer do
end
end
describe 'dialogflow disconnect' do
let(:mail) { described_class.with(account: account).dialogflow_disconnect.deliver_now }
it 'renders the subject' do
expect(mail.subject).to eq('Your Dialogflow integration was disconnected')
end
it 'renders the content' do
expect(mail.body).to include('Your Dialogflow integration was disconnected because of permission issues.')
end
it 'renders the receiver email' do
expect(mail.to).to eq([administrator.email])
end
end
describe 'facebook_disconnect' do
before do
stub_request(:post, /graph.facebook.com/)