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.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/factories/ml/models.rb b/spec/factories/ml/models.rb
index 3377a54f265..ae00ade9054 100644
--- a/spec/factories/ml/models.rb
+++ b/spec/factories/ml/models.rb
@@ -20,9 +20,7 @@ FactoryBot.define do
end
trait :with_metadata do
- after(:create) do |model|
- model.metadata = FactoryBot.create_list(:ml_model_metadata, 2, model: model) # rubocop:disable StrategyInCallback
- end
+ metadata { Array.new(2) { association(:ml_model_metadata, model: instance) } }
end
end
end