chore: Fix Dialogflow issue (#3210)

This commit is contained in:
Sojan Jose
2021-10-14 13:17:09 +05:30
committed by GitHub
parent 99abbb8158
commit e669f6766f
2 changed files with 13 additions and 1 deletions

View File

@@ -89,5 +89,17 @@ describe Integrations::Dialogflow::ProcessorService do
expect(processor.perform).to be(nil)
end
end
context 'when message updated' do
let(:message) do
create(:message, account: account, conversation: conversation, private: true,
submitted_values: [{ 'title' => 'Support', 'value' => 'selected_gas' }])
end
let(:event_name) { 'message.updated' }
it 'returns submitted value for message content' do
expect(processor.send(:message_content, message)).to eql('selected_gas')
end
end
end
end