Feature: Contact Merge Action (#378)
This commit is contained in:
9
spec/factories/contact_inbox.rb
Normal file
9
spec/factories/contact_inbox.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :contact_inbox do
|
||||
contact
|
||||
inbox
|
||||
source_id { SecureRandom.uuid }
|
||||
end
|
||||
end
|
||||
@@ -8,17 +8,14 @@ FactoryBot.define do
|
||||
agent_last_seen_at { Time.current }
|
||||
locked { false }
|
||||
|
||||
factory :complete_conversation do
|
||||
after(:build) do |conversation|
|
||||
conversation.account ||= create(:account)
|
||||
conversation.inbox ||= create(
|
||||
:inbox,
|
||||
account: conversation.account,
|
||||
channel: create(:channel_widget, account: conversation.account)
|
||||
)
|
||||
conversation.contact ||= create(:contact, account: conversation.account)
|
||||
conversation.assignee ||= create(:user)
|
||||
end
|
||||
after(:build) do |conversation|
|
||||
conversation.account ||= create(:account)
|
||||
conversation.inbox ||= create(
|
||||
:inbox,
|
||||
account: conversation.account,
|
||||
channel: create(:channel_widget, account: conversation.account)
|
||||
)
|
||||
conversation.contact ||= create(:contact, account: conversation.account)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user