Welcome to mirror list, hosted at ThFree Co, Russian Federation.

metric_images.rb « alert_management « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d7d8182af3ed58a958691970851a55d7f2efcb81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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