Chatwoot/spec/factories/kbase/categories.rb

13 lines
278 B
Ruby
Raw Normal View History

FactoryBot.define do
factory :kbase_category, class: 'Kbase::Category' do
portal { kbase_portal }
name { 'MyString' }
description { 'MyText' }
position { 1 }
after(:build) do |category|
category.account ||= category.portal.account
end
end
end