Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ad2c7999
Commit
ad2c7999
authored
Nov 11, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cop FactoryBot/InlineAssociation for package factories
parent
7a5d64de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
12 deletions
+10
-12
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-2
spec/factories/packages.rb
spec/factories/packages.rb
+9
-9
spec/factories/packages/package_file.rb
spec/factories/packages/package_file.rb
+1
-1
No files found.
.rubocop_manual_todo.yml
View file @
ad2c7999
...
...
@@ -16,8 +16,6 @@ FactoryBot/InlineAssociation:
-
'
spec/factories/import_export_uploads.rb'
-
'
spec/factories/merge_requests.rb'
-
'
spec/factories/notes.rb'
-
'
spec/factories/packages.rb'
-
'
spec/factories/packages/package_file.rb'
-
'
spec/factories/sent_notifications.rb'
-
'
spec/factories/uploads.rb'
-
'
spec/factories/wiki_pages.rb'
...
...
spec/factories/packages.rb
View file @
ad2c7999
...
...
@@ -129,7 +129,7 @@ FactoryBot.define do
end
trait
(
:without_loaded_metadatum
)
do
conan_metadatum
{
build
(
:conan_metadatum
,
package:
nil
)
}
conan_metadatum
{
association
(
:conan_metadatum
,
package:
nil
)
}
end
end
...
...
@@ -141,7 +141,7 @@ 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'
}
}
...
...
@@ -166,12 +166,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 +179,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 +188,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 +201,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 +213,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
...
...
spec/factories/packages/package_file.rb
View file @
ad2c7999
...
...
@@ -15,7 +15,7 @@ FactoryBot.define do
end
factory
:conan_package_file
do
package
{
create
(
:conan_package
,
without_package_files:
true
)
}
package
{
association
(
:conan_package
,
without_package_files:
true
)
}
transient
do
without_loaded_metadatum
{
false
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment