# Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ FactoryBot.define do factory 'knowledge_base/answer/translation/content', aliases: %i[knowledge_base_answer_translation_content] do translation { nil } body { Faker::Lorem.paragraph(sentence_count: 3) } before(:create) do |content| if content.translation.nil? create(:knowledge_base_answer_translation, content: content) end end trait :with_video do body { '( widget: video, provider: youtube, id: vTTzwJsHpU8 )' } end trait :with_image do body do '' end end end end