701eccb35c
- 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>
12 lines
278 B
Ruby
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
|