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
8b7d819a
Commit
8b7d819a
authored
Apr 06, 2020
by
Jonathan Schafer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup from MR comments
parent
5973f75c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
ee/app/views/projects/security/vulnerabilities/show.html.haml
...pp/views/projects/security/vulnerabilities/show.html.haml
+6
-6
ee/spec/controllers/projects/security/vulnerabilities_controller_spec.rb
...lers/projects/security/vulnerabilities_controller_spec.rb
+1
-1
ee/spec/helpers/vulnerabilities_helper_spec.rb
ee/spec/helpers/vulnerabilities_helper_spec.rb
+2
-0
No files found.
ee/app/views/projects/security/vulnerabilities/show.html.haml
View file @
8b7d819a
...
...
@@ -30,25 +30,25 @@
%h3
=
_
(
'Location'
)
%ul
%li
=
_
(
"File:"
)
=
_
(
'File:'
)
=
vulnerability_file_link
(
@vulnerability
)
-
if
location
[
'class'
]
%li
=
_
(
"Class:"
)
=
_
(
'Class:'
)
=
location
[
'class'
]
-
if
location
[
'method'
]
%li
=
_
(
"Method:"
)
=
_
(
'Method:'
)
%code
=
location
[
'method'
]
-
if
finding
.
links
.
any?
%h3
=
_
(
"Links"
)
%h3
=
_
(
'Links'
)
%ul
-
finding
.
links
.
each
do
|
link
|
%li
=
link_to
link
[
"url"
],
target:
'_blank'
,
rel:
'noopener noreferrer'
%li
=
link_to
link
[
'url'
],
target:
'_blank'
,
rel:
'noopener noreferrer'
-
if
finding
.
identifiers
.
any?
%h3
=
_
(
"Identifiers"
)
%h3
=
_
(
'Identifiers'
)
%ul
-
finding
.
identifiers
.
each
do
|
identifier
|
%li
=
link_to
identifier
.
name
,
identifier
.
url
,
target:
'_blank'
,
rel:
'noopener noreferrer'
...
...
ee/spec/controllers/projects/security/vulnerabilities_controller_spec.rb
View file @
8b7d819a
...
...
@@ -80,7 +80,7 @@ describe Projects::Security::VulnerabilitiesController do
it
'renders the file location'
do
show_vulnerability
expect
(
response
.
body
).
to
have_text
(
vulnerability
.
finding
.
location
[
"file"
])
expect
(
response
.
body
).
to
have_text
(
vulnerability
.
finding
.
location
[
'file'
])
end
it
'renders the solution card'
do
...
...
ee/spec/helpers/vulnerabilities_helper_spec.rb
View file @
8b7d819a
...
...
@@ -142,6 +142,7 @@ describe VulnerabilitiesHelper do
it
'uses the default branch'
do
vulnerability
.
finding
.
pipelines
=
[]
vulnerability
.
finding
.
save
expect
(
subject
).
to
include
(
vulnerability
.
project
.
default_branch
)
...
...
@@ -152,6 +153,7 @@ describe VulnerabilitiesHelper do
it
'does not include a reference to the line number'
do
vulnerability
.
finding
.
location
[
'start_line'
]
=
nil
vulnerability
.
finding
.
save
expect
(
subject
).
not_to
include
(
'#L'
)
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