diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/factories/packages.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/factories/packages.rb')
-rw-r--r-- | spec/factories/packages.rb | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/spec/factories/packages.rb b/spec/factories/packages.rb index e2c5b000988..73870a28b89 100644 --- a/spec/factories/packages.rb +++ b/spec/factories/packages.rb @@ -129,7 +129,7 @@ FactoryBot.define do end trait(:without_loaded_metadatum) do - conan_metadatum { build(:conan_metadatum, package: nil) } + conan_metadatum { build(:conan_metadatum, package: nil) } # rubocop:disable FactoryBot/InlineAssociation end end @@ -141,16 +141,12 @@ FactoryBot.define do end factory :composer_metadatum, class: 'Packages::Composer::Metadatum' do - package { create(:composer_package) } + package { association(:composer_package) } target_sha { '123' } composer_json { { name: 'foo' } } end - factory :package_build_info, class: 'Packages::BuildInfo' do - package - end - factory :maven_metadatum, class: 'Packages::Maven::Metadatum' do association :package, package_type: :maven path { 'my/company/app/my-app/1.0-SNAPSHOT' } @@ -166,12 +162,12 @@ FactoryBot.define do end factory :pypi_metadatum, class: 'Packages::Pypi::Metadatum' do - package { create(:pypi_package, without_loaded_metadatum: true) } + package { association(:pypi_package, without_loaded_metadatum: true) } required_python { '>=2.7' } end factory :nuget_metadatum, class: 'Packages::Nuget::Metadatum' do - package { create(:nuget_package) } + package { association(:nuget_package) } license_url { 'http://www.gitlab.com' } project_url { 'http://www.gitlab.com' } @@ -179,7 +175,7 @@ FactoryBot.define do end factory :conan_file_metadatum, class: 'Packages::Conan::FileMetadatum' do - package_file { create(:conan_package_file, :conan_recipe_file, without_loaded_metadatum: true) } + package_file { association(:conan_package_file, :conan_recipe_file, without_loaded_metadatum: true) } recipe_revision { '0' } conan_file_type { 'recipe_file' } @@ -188,7 +184,7 @@ FactoryBot.define do end trait(:package_file) do - package_file { create(:conan_package_file, :conan_package, without_loaded_metadatum: true) } + package_file { association(:conan_package_file, :conan_package, without_loaded_metadatum: true) } conan_file_type { 'package_file' } package_revision { '0' } conan_package_reference { '123456789' } @@ -201,8 +197,8 @@ FactoryBot.define do end factory :packages_dependency_link, class: 'Packages::DependencyLink' do - package { create(:nuget_package) } - dependency { create(:packages_dependency) } + package { association(:nuget_package) } + dependency { association(:packages_dependency) } dependency_type { :dependencies } trait(:with_nuget_metadatum) do @@ -213,7 +209,7 @@ FactoryBot.define do end factory :nuget_dependency_link_metadatum, class: 'Packages::Nuget::DependencyLinkMetadatum' do - dependency_link { create(:packages_dependency_link) } + dependency_link { association(:packages_dependency_link) } target_framework { '.NETStandard2.0' } end |