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
a5eb25b5
Commit
a5eb25b5
authored
Apr 09, 2020
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update specs for CreateService
parent
1d41deca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
ee/spec/services/vulnerabilities/create_service_spec.rb
ee/spec/services/vulnerabilities/create_service_spec.rb
+11
-1
No files found.
ee/spec/services/vulnerabilities/create_service_spec.rb
View file @
a5eb25b5
...
...
@@ -26,7 +26,7 @@ describe Vulnerabilities::CreateService do
have_attributes
(
author:
user
,
title:
finding
.
name
,
state:
'detected'
,
state:
finding
.
state
,
severity:
finding
.
severity
,
severity_overridden:
false
,
confidence:
finding
.
confidence
,
...
...
@@ -35,6 +35,16 @@ describe Vulnerabilities::CreateService do
))
end
context
'and finding is dismissed'
do
let
(
:finding
)
{
create
(
:vulnerabilities_occurrence
,
:dismissed
,
project:
project
)
}
it
'creates a vulnerability in a dismissed state'
do
expect
{
subject
}.
to
change
{
project
.
vulnerabilities
.
count
}.
by
(
1
)
expect
(
project
.
vulnerabilities
.
last
.
state
).
to
eq
(
'dismissed'
)
end
end
it
'starts a new transaction for the create sequence'
do
allow
(
Vulnerabilities
::
Occurrence
).
to
receive
(
:transaction
).
and_call_original
...
...
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