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
975b36c6
Commit
975b36c6
authored
Oct 29, 2020
by
a_luna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cop FactoryBot/InlineAssociation for uploads
parent
75223963
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
.rubocop_todo.yml
.rubocop_todo.yml
+0
-1
spec/factories/uploads.rb
spec/factories/uploads.rb
+6
-6
No files found.
.rubocop_todo.yml
View file @
975b36c6
...
...
@@ -1281,4 +1281,3 @@ FactoryBot/InlineAssociation:
-
'
spec/factories/packages.rb'
-
'
spec/factories/packages/package_file.rb'
-
'
spec/factories/sent_notifications.rb'
-
'
spec/factories/uploads.rb'
spec/factories/uploads.rb
View file @
975b36c6
...
...
@@ -2,7 +2,7 @@
FactoryBot
.
define
do
factory
:upload
do
model
{
create
(
:project
)
}
model
{
association
(
:project
)
}
size
{
100
.
kilobytes
}
uploader
{
"AvatarUploader"
}
mount_point
{
:avatar
}
...
...
@@ -20,7 +20,7 @@ FactoryBot.define do
end
trait
:personal_snippet_upload
do
model
{
create
(
:personal_snippet
)
}
model
{
association
(
:personal_snippet
)
}
path
{
File
.
join
(
secret
,
filename
)
}
uploader
{
"PersonalFileUploader"
}
secret
{
SecureRandom
.
hex
}
...
...
@@ -46,7 +46,7 @@ FactoryBot.define do
end
trait
:namespace_upload
do
model
{
create
(
:group
)
}
model
{
association
(
:group
)
}
path
{
File
.
join
(
secret
,
filename
)
}
uploader
{
"NamespaceFileUploader"
}
secret
{
SecureRandom
.
hex
}
...
...
@@ -54,7 +54,7 @@ FactoryBot.define do
end
trait
:favicon_upload
do
model
{
create
(
:appearance
)
}
model
{
association
(
:appearance
)
}
uploader
{
"FaviconUploader"
}
secret
{
SecureRandom
.
hex
}
mount_point
{
:favicon
}
...
...
@@ -62,13 +62,13 @@ FactoryBot.define do
trait
:attachment_upload
do
mount_point
{
:attachment
}
model
{
create
(
:note
)
}
model
{
association
(
:note
)
}
uploader
{
"AttachmentUploader"
}
end
trait
:design_action_image_v432x230_upload
do
mount_point
{
:image_v432x230
}
model
{
create
(
:design_action
)
}
model
{
association
(
:design_action
)
}
uploader
{
::
DesignManagement
::
DesignV432x230Uploader
.
name
}
end
end
...
...
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