2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
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 }
|
2021-07-01 11:23:52 +00:00
|
|
|
body { Faker::Lorem.paragraph(sentence_count: 3) }
|
2019-06-04 03:40:48 +00:00
|
|
|
|
|
|
|
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
|
2020-05-28 08:02:07 +00:00
|
|
|
|
|
|
|
trait :with_image do
|
|
|
|
body do
|
|
|
|
'<img style="width: 152px; max-width: 100%;" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCACYAJgDAREAAhEBAxEB/8QAHgABAAICAwEBAQAAAAAAAAAAAAkKBwgEBQYLAQL/xAA1EAAABgICAgEDAwIFAwUAAAABAgMEBQYABwgRCRITFBUhCiIxFkEXGCMkUSYycTNCYXKB/8QAHgEBAAICAgMBAAAAAAAAAAAAAAcIBgkEBQECAwr/xAA8EQACAgICAQMDAgMFBgUFAAABAgMEAAUGERIHEyEIFDEiQRUyUQkWI0JhFyQzQ3GRUmKBofAlZHKTov/aAAwD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