Chatwoot/spec/factories/channel/channel_widget.rb
Sojan Jose 722f540b03 [Feature] Email collect message hooks (#331)
- Add email collect hook on creating conversation
- Merge contact if it already exist
2020-01-09 13:06:40 +05:30

13 lines
415 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :channel_widget, class: 'Channel::WebWidget' do
sequence(:website_name) { |n| "Example Website #{n}" }
sequence(:website_url) { |n| "https://example-#{n}.com" }
sequence(:widget_color, &:to_s)
account
after(:create) do |channel_widget|
create(:inbox, channel: channel_widget, account: channel_widget.account)
end
end
end