feat: Add APIs for Dialogflow integration V1 (#2155)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-05-05 21:06:11 +05:30
committed by GitHub
parent fd0c26cdae
commit b30ecb27a6
19 changed files with 303 additions and 26 deletions

View File

@@ -350,6 +350,15 @@ RSpec.describe Conversation, type: :model do
end
end
describe '#botintegration: when conversation created in inbox with dialogflow integration' do
let(:hook) { create(:integrations_hook, app_id: 'dialogflow') }
let(:conversation) { create(:conversation, inbox: hook.inbox) }
it 'returns conversation status as bot' do
expect(conversation.status).to eq('bot')
end
end
describe '#can_reply?' do
describe 'on channels without 24 hour restriction' do
let(:conversation) { create(:conversation) }