1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/factories/org_unit_kinds.rb
2019-09-30 22:19:59 +05:00

17 lines
466 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :some_root_org_unit_kind, class: OrgUnitKind do
codename { Faker::Internet.unique.username 3..36, %w[_] }
short_name { name }
name { Faker::Company.unique.name }
trait :with_parent do
association :parent_kind, factory: :some_root_org_unit_kind
end
end
factory :some_children_org_unit_kind,
parent: :some_root_org_unit_kind,
traits: %i[with_parent]
end