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
48388541
Commit
48388541
authored
Dec 18, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Vulnerabilities::Finding#remediations method
parent
04f0ec2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ee/app/models/vulnerabilities/finding.rb
ee/app/models/vulnerabilities/finding.rb
+1
-1
ee/spec/models/vulnerabilities/finding_spec.rb
ee/spec/models/vulnerabilities/finding_spec.rb
+1
-1
No files found.
ee/app/models/vulnerabilities/finding.rb
View file @
48388541
...
...
@@ -241,7 +241,7 @@ module Vulnerabilities
def
remediations
return
metadata
.
dig
(
'remediations'
)
unless
super
.
present?
super
.
as_json
(
only:
[
:summary
,
:diff
])
super
.
as_json
(
only:
[
:summary
],
methods:
[
:diff
])
end
def
build_evidence_request
(
data
)
...
...
ee/spec/models/vulnerabilities/finding_spec.rb
View file @
48388541
...
...
@@ -461,7 +461,7 @@ RSpec.describe Vulnerabilities::Finding do
context
'when the finding has associated remediation records'
do
let!
(
:persisted_remediation
)
{
create
(
:vulnerabilities_remediation
,
findings:
[
finding
])
}
let
(
:remediation_hash
)
{
persisted_remediation
.
as_json
(
only:
[
:summary
,
:diff
])
}
let
(
:remediation_hash
)
{
{
'summary'
=>
persisted_remediation
.
summary
,
'diff'
=>
persisted_remediation
.
diff
}
}
it
{
is_expected
.
to
eq
([
remediation_hash
])
}
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