2019-06-04 03:40:48 +00:00
|
|
|
FactoryBot.define do
|
|
|
|
factory 'knowledge_base/answer/translation/content', aliases: %i[knowledge_base_answer_translation_content] do
|
|
|
|
translation { nil }
|
|
|
|
body { Faker::Lorem.paragraph(3) }
|
|
|
|
|
|
|
|
before(:create) do |content|
|
|
|
|
if content.translation.nil?
|
2019-09-18 17:25:04 +00:00
|
|
|
create(:knowledge_base_answer_translation, content: content)
|
2019-06-04 03:40:48 +00:00
|
|
|
end
|
|
|
|
end
|
2020-02-19 17:07:52 +00:00
|
|
|
|
|
|
|
trait :with_video do
|
|
|
|
body { '( widget: video, provider: youtube, id: vTTzwJsHpU8 )' }
|
|
|
|
end
|
2019-06-04 03:40:48 +00:00
|
|
|
end
|
|
|
|
end
|