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
1eb03ae1
Commit
1eb03ae1
authored
Oct 09, 2019
by
Victor Zagorodny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce vulnerabilities count in trait to 2
parent
d8cf6e5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ee/spec/factories/projects.rb
ee/spec/factories/projects.rb
+1
-1
ee/spec/requests/api/vulnerabilities_spec.rb
ee/spec/requests/api/vulnerabilities_spec.rb
+1
-1
No files found.
ee/spec/factories/projects.rb
View file @
1eb03ae1
...
@@ -92,7 +92,7 @@ FactoryBot.modify do
...
@@ -92,7 +92,7 @@ FactoryBot.modify do
trait
:with_vulnerabilities
do
trait
:with_vulnerabilities
do
after
(
:create
)
do
|
project
|
after
(
:create
)
do
|
project
|
create_list
(
:vulnerability
,
3
,
:opened
,
project:
project
)
create_list
(
:vulnerability
,
2
,
:opened
,
project:
project
)
end
end
end
end
end
end
...
...
ee/spec/requests/api/vulnerabilities_spec.rb
View file @
1eb03ae1
...
@@ -31,7 +31,7 @@ describe API::Vulnerabilities do
...
@@ -31,7 +31,7 @@ describe API::Vulnerabilities do
get
api
(
"
#{
project_vulnerabilities_path
}
?page=2&per_page=1"
,
user
)
get
api
(
"
#{
project_vulnerabilities_path
}
?page=2&per_page=1"
,
user
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
json_response
.
map
{
|
v
|
v
[
'id'
]
}).
to
contain_exactly
(
project
.
vulnerabilities
.
drop
(
1
).
take
(
1
).
first
.
id
)
expect
(
json_response
.
map
{
|
v
|
v
[
'id'
]
}).
to
contain_exactly
(
project
.
vulnerabilities
.
second
.
id
)
end
end
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