mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
20 lines
462 B
Ruby
20 lines
462 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Read about factories at https://github.com/thoughtbot/factory_bot
|
|
|
|
FactoryBot.define do
|
|
factory :sponsor do
|
|
name { Faker::Company.name }
|
|
website_url { Faker::Internet.url }
|
|
description { Faker::Lorem.paragraph }
|
|
|
|
sponsorship_level
|
|
|
|
after(:create) do |sponsor|
|
|
File.open("spec/support/logos/#{1 + rand(13)}.png") do |file|
|
|
sponsor.picture = file
|
|
end
|
|
sponsor.save!
|
|
end
|
|
end
|
|
end
|