summaryrefslogtreecommitdiff
path: root/spec/factories/ml/candidates.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/ml/candidates.rb')
-rw-r--r--spec/factories/ml/candidates.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/factories/ml/candidates.rb b/spec/factories/ml/candidates.rb
index 2daed36d777..1b41e39d711 100644
--- a/spec/factories/ml/candidates.rb
+++ b/spec/factories/ml/candidates.rb
@@ -16,5 +16,14 @@ FactoryBot.define do
candidate.metadata = FactoryBot.create_list(:ml_candidate_metadata, 2, candidate: candidate )
end
end
+
+ trait :with_artifact do
+ after(:create) do |candidate|
+ FactoryBot.create(:generic_package,
+ name: candidate.package_name,
+ version: candidate.package_version,
+ project: candidate.project)
+ end
+ end
end
end