summaryrefslogtreecommitdiff
path: root/spec/factories/packages.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/packages.rb')
-rw-r--r--spec/factories/packages.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/factories/packages.rb b/spec/factories/packages.rb
index 2c64abefb01..882bac1daa9 100644
--- a/spec/factories/packages.rb
+++ b/spec/factories/packages.rb
@@ -277,6 +277,10 @@ FactoryBot.define do
factory :packages_dependency, class: 'Packages::Dependency' do
sequence(:name) { |n| "@test/package-#{n}"}
sequence(:version_pattern) { |n| "~6.2.#{n}" }
+
+ trait(:rubygems) do
+ sequence(:name) { |n| "gem-dependency-#{n}"}
+ end
end
factory :packages_dependency_link, class: 'Packages::DependencyLink' do
@@ -289,6 +293,11 @@ FactoryBot.define do
link.nuget_metadatum = build(:nuget_dependency_link_metadatum)
end
end
+
+ trait(:rubygems) do
+ package { association(:rubygems_package) }
+ dependency { association(:packages_dependency, :rubygems) }
+ end
end
factory :nuget_dependency_link_metadatum, class: 'Packages::Nuget::DependencyLinkMetadatum' do