trabajo-afectivo/spec/factories/knowledge_base/locale.rb

15 lines
417 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
2019-06-04 03:40:48 +00:00
FactoryBot.define do
factory 'knowledge_base/locale', aliases: %i[knowledge_base_locale] do
knowledge_base { nil }
system_locale { Locale.first || create(:locale) }
2019-06-04 03:40:48 +00:00
before :create do |kb_locale|
if kb_locale.knowledge_base.blank?
create(:knowledge_base, given_kb_locale: kb_locale)
end
end
end
end