Chatwoot/spec/factories/channel/channel_widget.rb
Sojan Jose 941fbb0d72
Chore: Web widget Inbox Tech Debts (#738)
* Chore: Webwidget Inbox Tech Debts

* Additional customization options creating Web Widget
* Changes to edit Page for Web Widget
* Remove the WebWidget API end points
* Minor chores

Address: #680, #502

Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-04-19 23:40:28 +05:30

12 lines
356 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :channel_widget, class: 'Channel::WebWidget' do
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