Chatwoot/spec/services/message_templates/template/out_of_office_spec.rb
Adam Zysko 65ed4c78a4
feat: Business hours
Data models and APIs for business hours

ref: #234
2020-11-01 00:14:33 +05:30

13 lines
462 B
Ruby

require 'rails_helper'
describe ::MessageTemplates::Template::OutOfOffice 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).to eq(conversation.inbox.out_of_office_message)
end
end
end