Chatwoot/spec/factories/channel/channel_email.rb

13 lines
371 B
Ruby
Raw Normal View History

# frozen_string_literal: true
FactoryBot.define do
factory :channel_email, class: 'Channel::Email' do
sequence(:email) { |n| "care-#{n}@example.com" }
2021-03-04 08:29:59 +00:00
sequence(:forward_to_email) { |n| "forward-#{n}@chatwoot.com" }
account
after(:create) do |channel_email|
create(:inbox, channel: channel_email, account: channel_email.account)
end
end
end