mirror of
https://github.com/lingble/chatwoot.git
synced 2025-10-29 02:02:27 +00:00
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com> Co-authored-by: Sojan Jose <sojan@chatwoot.com>
14 lines
357 B
Ruby
14 lines
357 B
Ruby
FactoryBot.define do
|
|
factory :conversation_participant do
|
|
conversation
|
|
account
|
|
|
|
before(:build) do |conversation|
|
|
if conversation.user.blank?
|
|
conversation.user = create(:user, account: conversation.account)
|
|
create(:inbox_member, user: conversation.user, inbox: conversation.conversation.inbox)
|
|
end
|
|
end
|
|
end
|
|
end
|