feat: Add CSAT Message Template Hooks (#2494)

This commit is contained in:
Sojan Jose
2021-06-23 19:29:27 +05:30
committed by GitHub
parent 640e028bde
commit cd11efea1d
6 changed files with 115 additions and 7 deletions

View File

@@ -0,0 +1,13 @@
require 'rails_helper'
describe ::MessageTemplates::Template::CsatSurvey do
context 'when this hook is called' do
let(:conversation) { create(:conversation) }
it 'creates the out of office messages' do
described_class.new(conversation: conversation).perform
expect(conversation.messages.template.count).to eq(1)
expect(conversation.messages.template.first.content_type).to eq('input_csat')
end
end
end