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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ml/models.rb')
-rw-r--r--spec/factories/ml/models.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/factories/ml/models.rb b/spec/factories/ml/models.rb
index 158c26499b0..3377a54f265 100644
--- a/spec/factories/ml/models.rb
+++ b/spec/factories/ml/models.rb
@@ -18,5 +18,11 @@ FactoryBot.define do
versions { [version] }
latest_version { version }
end
+
+ trait :with_metadata do
+ after(:create) do |model|
+ model.metadata = FactoryBot.create_list(:ml_model_metadata, 2, model: model) # rubocop:disable StrategyInCallback
+ end
+ end
end
end