OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/modules/avatars/spec/factories/avatar_attachment_factory.rb

15 lines
467 B

FactoryBot.define do
factory :avatar_attachment, class: Attachment do
author factory: :user
container factory: :work_package
description { "avatar" }
filename { "avatar.jpg" }
content_type { "image/jpeg" }
file do
OpenProject::Files.create_uploaded_file name: filename,
content_type: content_type,
binary: true
end
end
end