Chore: Add Facebook app set up documentation (#647)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
@@ -46,6 +46,15 @@ describe Facebook::SendReplyService do
|
||||
create(:message, message_type: 'outgoing', inbox: facebook_inbox, account: account, conversation: conversation)
|
||||
expect(bot).to have_received(:deliver)
|
||||
end
|
||||
|
||||
it 'if message with attachment is sent from chatwoot and is outgoing' do
|
||||
create(:message, message_type: :incoming, inbox: facebook_inbox, account: account, conversation: conversation)
|
||||
message = build(:message, message_type: 'outgoing', inbox: facebook_inbox, account: account, conversation: conversation)
|
||||
message.attachment = Attachment.new(account_id: message.account_id, file_type: :image)
|
||||
message.attachment.file.attach(io: File.open(Rails.root.join('spec/assets/avatar.png')), filename: 'avatar.png', content_type: 'image/png')
|
||||
message.save!
|
||||
expect(bot).to have_received(:deliver)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user