debian-mirror-gitlab/spec/factories/ml/experiments.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
404 B
Ruby
Raw Permalink Normal View History

2022-10-11 01:57:18 +05:30
# frozen_string_literal: true
FactoryBot.define do
factory :ml_experiments, class: '::Ml::Experiment' do
sequence(:name) { |n| "experiment#{n}" }
2022-11-25 23:54:43 +05:30
project
2023-03-04 22:38:38 +05:30
user { project&.creator }
trait :with_metadata do
after(:create) do |e|
e.metadata = FactoryBot.create_list(:ml_experiment_metadata, 2, experiment: e) # rubocop:disable StrategyInCallback
end
end
2022-10-11 01:57:18 +05:30
end
end