Feature: Inbox greeting message (#927)

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Sojan Jose
2020-06-09 23:54:35 +05:30
committed by GitHub
parent 8b022311c0
commit 432dad203b
48 changed files with 262 additions and 120 deletions

View File

@@ -6,7 +6,7 @@ describe ::MessageTemplates::Template::EmailCollect do
it 'creates the email collect messages' do
described_class.new(conversation: conversation).perform
expect(conversation.messages.count).to eq(3)
expect(conversation.messages.count).to eq(2)
end
end
end

View File

@@ -0,0 +1,12 @@
require 'rails_helper'
describe ::MessageTemplates::Template::Greeting do
context 'when this hook is called' do
let(:conversation) { create(:conversation) }
it 'creates the email collect messages' do
described_class.new(conversation: conversation).perform
expect(conversation.messages.count).to eq(1)
end
end
end