Chore: API Improvements (#2956)
- API to fetch info of a single inbox - Document passing custom_attributes in the API - Ability to filter contacts with contact identifier in search API
This commit is contained in:
@@ -3,9 +3,15 @@
|
||||
FactoryBot.define do
|
||||
factory :contact do
|
||||
sequence(:name) { |n| "Contact #{n}" }
|
||||
sequence(:email) { |n| "contact-#{n}@example.com" }
|
||||
phone_number { Faker::PhoneNumber.cell_phone_in_e164 }
|
||||
avatar { fixture_file_upload(Rails.root.join('spec/assets/avatar.png'), 'image/png') }
|
||||
account
|
||||
|
||||
trait :with_email do
|
||||
sequence(:email) { |n| "contact-#{n}@example.com" }
|
||||
end
|
||||
|
||||
trait :with_phone_number do
|
||||
phone_number { Faker::PhoneNumber.cell_phone_in_e164 }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ FactoryBot.define do
|
||||
account: conversation.account,
|
||||
channel: create(:channel_widget, account: conversation.account)
|
||||
)
|
||||
conversation.contact ||= create(:contact, account: conversation.account)
|
||||
conversation.contact ||= create(:contact, :with_email, account: conversation.account)
|
||||
conversation.contact_inbox ||= create(:contact_inbox, contact: conversation.contact, inbox: conversation.inbox)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user