debian-mirror-gitlab/spec/factories/alert_management/metric_images.rb
2022-06-21 17:19:12 +05:30

16 lines
420 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :alert_metric_image, class: 'AlertManagement::MetricImage' do
association :alert, factory: :alert_management_alert
url { generate(:url) }
trait :local do
file_store { ObjectStorage::Store::LOCAL }
end
after(:build) do |image|
image.file = fixture_file_upload('spec/fixtures/rails_sample.jpg', 'image/jpg')
end
end
end