Chatwoot/spec/factories/channel/channel_whatsapp.rb
Sojan Jose bd7aeba484
chore: Provider API prototype (#3112)
Enabling Support for Whatsapp via 360Dialog as a prototype for the provider APIs. 

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-05 23:35:06 +05:30

11 lines
341 B
Ruby

FactoryBot.define do
factory :channel_whatsapp, class: 'Channel::Whatsapp' do
sequence(:phone_number) { |n| "+123456789#{n}1" }
account
provider_config { { 'api_key' => 'test_key' } }
after(:create) do |channel_whatsapp|
create(:inbox, channel: channel_whatsapp, account: channel_whatsapp.account)
end
end
end