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
28ba89dd
Commit
28ba89dd
authored
Jul 31, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename vulnerability_statistic factory traits
parent
26d099cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
ee/spec/factories/vulnerabilities/statistics.rb
ee/spec/factories/vulnerabilities/statistics.rb
+5
-5
ee/spec/models/vulnerabilities/projects_grade_spec.rb
ee/spec/models/vulnerabilities/projects_grade_spec.rb
+5
-5
ee/spec/requests/api/graphql/project/vulnerability_severities_count_spec.rb
...pi/graphql/project/vulnerability_severities_count_spec.rb
+1
-1
No files found.
ee/spec/factories/vulnerabilities/statistics.rb
View file @
28ba89dd
...
...
@@ -4,24 +4,24 @@ FactoryBot.define do
factory
:vulnerability_statistic
,
class:
'Vulnerabilities::Statistic'
do
project
trait
:a
do
trait
:
grade_
a
do
info
{
1
}
end
trait
:b
do
trait
:
grade_
b
do
low
{
1
}
end
trait
:c
do
trait
:
grade_
c
do
medium
{
1
}
end
trait
:d
do
trait
:
grade_
d
do
high
{
1
}
unknown
{
1
}
end
trait
:f
do
trait
:
grade_
f
do
critical
{
1
}
end
end
...
...
ee/spec/models/vulnerabilities/projects_grade_spec.rb
View file @
28ba89dd
...
...
@@ -10,11 +10,11 @@ RSpec.describe Vulnerabilities::ProjectsGrade do
let_it_be
(
:project_4
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:project_5
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:vulnerability_statistic_1
)
{
create
(
:vulnerability_statistic
,
:a
,
project:
project_1
)
}
let_it_be
(
:vulnerability_statistic_2
)
{
create
(
:vulnerability_statistic
,
:b
,
project:
project_2
)
}
let_it_be
(
:vulnerability_statistic_3
)
{
create
(
:vulnerability_statistic
,
:b
,
project:
project_3
)
}
let_it_be
(
:vulnerability_statistic_4
)
{
create
(
:vulnerability_statistic
,
:c
,
project:
project_4
)
}
let_it_be
(
:vulnerability_statistic_5
)
{
create
(
:vulnerability_statistic
,
:f
,
project:
project_5
)
}
let_it_be
(
:vulnerability_statistic_1
)
{
create
(
:vulnerability_statistic
,
:
grade_
a
,
project:
project_1
)
}
let_it_be
(
:vulnerability_statistic_2
)
{
create
(
:vulnerability_statistic
,
:
grade_
b
,
project:
project_2
)
}
let_it_be
(
:vulnerability_statistic_3
)
{
create
(
:vulnerability_statistic
,
:
grade_
b
,
project:
project_3
)
}
let_it_be
(
:vulnerability_statistic_4
)
{
create
(
:vulnerability_statistic
,
:
grade_
c
,
project:
project_4
)
}
let_it_be
(
:vulnerability_statistic_5
)
{
create
(
:vulnerability_statistic
,
:
grade_
f
,
project:
project_5
)
}
describe
'.grades_for'
do
let
(
:compare_key
)
{
->
(
projects_grade
)
{
[
projects_grade
.
grade
,
projects_grade
.
project_ids
.
sort
]
}
}
...
...
ee/spec/requests/api/graphql/project/vulnerability_severities_count_spec.rb
View file @
28ba89dd
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec
.
describe
'Query.project(fullPath).vulnerabilitySeveritiesCount'
do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:statistic
)
{
create
(
:vulnerability_statistic
,
:d
,
project:
project
)
}
let_it_be
(
:statistic
)
{
create
(
:vulnerability_statistic
,
:
grade_
d
,
project:
project
)
}
let_it_be
(
:query
)
do
%(
...
...
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