Chatwoot/spec/factories/channel/channel_email.rb
2021-03-04 13:59:59 +05:30

12 lines
371 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :channel_email, class: 'Channel::Email' do
sequence(:email) { |n| "care-#{n}@example.com" }
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