Feature: Inbox greeting message (#927)
Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
@@ -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
|
||||
|
||||
12
spec/services/message_templates/template/greeting_spec.rb
Normal file
12
spec/services/message_templates/template/greeting_spec.rb
Normal 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
|
||||
Reference in New Issue
Block a user