a07200bedf
* chore: Campaign ID migration for existing accounts * chore: update factory * chore: minor fixes * chore: fixes
16 lines
429 B
Ruby
16 lines
429 B
Ruby
# frozen_string_literal: true
|
|
|
|
FactoryBot.define do
|
|
factory :campaign do
|
|
sequence(:title) { |n| "Campaign #{n}" }
|
|
sequence(:message) { |n| "Campaign message #{n}" }
|
|
after(:build) do |campaign|
|
|
campaign.account ||= create(:account)
|
|
campaign.inbox ||= create(
|
|
:inbox,
|
|
account: campaign.account,
|
|
channel: create(:channel_widget, account: campaign.account)
|
|
)
|
|
end
|
|
end
|
|
end
|