Chatwoot/spec/factories/kbase/categories.rb
Subin T P 701eccb35c
Feature: Knowledge Base APIs (#1002)
- Introduce models & migrations for portals, categories, folders and articles
- CRUD API for portals
- CRUD API for categories

Addresses: #714

Co-authored-by: Sojan <sojan@pepalo.com>
2020-09-26 02:32:34 +05:30

12 lines
278 B
Ruby

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