Files
chatwoot/spec/factories/conversation_participants.rb
Pranav Raj S 7044eda281 chore: Add controllers for conversation participants (#6462)
Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
Co-authored-by: Sojan Jose <sojan@chatwoot.com>
2023-02-15 16:33:31 -08:00

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