a18d54b706
* Chore: Enable file upload for facebook messenger * Chore: Fix attachments * Chore: Fix Specs * Fix ReplyBox file attachment logic * Set default value for message Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
17 lines
505 B
Ruby
17 lines
505 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :message do
|
|
content { 'Incoming Message' }
|
|
status { 'sent' }
|
|
message_type { 'incoming' }
|
|
content_type { 'text' }
|
|
account { create(:account) }
|
|
|
|
after(:build) do |message|
|
|
message.sender ||= create(:user, account: message.account)
|
|
message.inbox ||= create(:inbox, account: message.account)
|
|
message.conversation ||= create(:conversation, account: message.account, inbox: message.inbox)
|
|
end
|
|
end
|
|
end
|