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
13c5ed14
Commit
13c5ed14
authored
Mar 09, 2021
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check if the IssueLink is valid
parent
3ad54556
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
ee/spec/services/security/store_report_service_spec.rb
ee/spec/services/security/store_report_service_spec.rb
+16
-3
No files found.
ee/spec/services/security/store_report_service_spec.rb
View file @
13c5ed14
...
@@ -285,9 +285,9 @@ RSpec.describe Security::StoreReportService, '#execute' do
...
@@ -285,9 +285,9 @@ RSpec.describe Security::StoreReportService, '#execute' do
end
end
end
end
context
'when there is an asso
i
ciated issue feedback with finding'
do
context
'when there is an associated issue feedback with finding'
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:issue_feedback
)
do
let
!
(
:issue_feedback
)
do
create
(
create
(
:vulnerability_feedback
,
:vulnerability_feedback
,
:sast
,
:sast
,
...
@@ -299,9 +299,22 @@ RSpec.describe Security::StoreReportService, '#execute' do
...
@@ -299,9 +299,22 @@ RSpec.describe Security::StoreReportService, '#execute' do
end
end
it
'inserts issue links from the new pipeline'
do
it
'inserts issue links from the new pipeline'
do
issue_feedback
expect
{
subject
}.
to
change
{
Vulnerabilities
::
IssueLink
.
count
}.
by
(
1
)
expect
{
subject
}.
to
change
{
Vulnerabilities
::
IssueLink
.
count
}.
by
(
1
)
end
end
it
'the issue link is valid'
do
subject
finding
=
Vulnerabilities
::
Finding
.
find_by
(
uuid:
new_report
.
findings
.
first
.
uuid
)
vulnerability_id
=
finding
.
vulnerability_id
issue_id
=
issue
.
id
issue_link
=
Vulnerabilities
::
IssueLink
.
find_by
(
vulnerability_id:
vulnerability_id
,
issue_id:
issue_id
)
expect
(
issue_link
).
not_to
be_nil
end
end
end
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