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
1ea63c3e
Commit
1ea63c3e
authored
Feb 19, 2021
by
Kerri Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update predicate methods to use more compact formulation
parent
b4da574a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+2
-6
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+2
-2
No files found.
ee/app/models/ee/project.rb
View file @
1ea63c3e
...
...
@@ -240,15 +240,11 @@ module EE
end
def
jira_vulnerabilities_integration_enabled?
return
false
unless
jira_service
jira_service
.
jira_vulnerabilities_integration_enabled?
!!
jira_service
&
.
jira_vulnerabilities_integration_enabled?
end
def
configured_to_create_issues_from_vulnerabilities?
return
false
unless
jira_service
jira_service
.
configured_to_create_issues_from_vulnerabilities?
!!
jira_service
&
.
configured_to_create_issues_from_vulnerabilities?
end
end
...
...
ee/spec/models/project_spec.rb
View file @
1ea63c3e
...
...
@@ -62,7 +62,7 @@ RSpec.describe Project do
describe
'#jira_vulnerabilities_integration_enabled?'
do
context
'when project lacks a jira_service relation'
do
it
'returns false'
do
expect
(
project
.
jira_vulnerabilities_integration_enabled?
).
to
be
_falsey
expect
(
project
.
jira_vulnerabilities_integration_enabled?
).
to
be
false
end
end
...
...
@@ -83,7 +83,7 @@ RSpec.describe Project do
describe
'#configured_to_create_issues_from_vulnerabilities?'
do
context
'when project lacks a jira_service relation'
do
it
'returns false'
do
expect
(
project
.
configured_to_create_issues_from_vulnerabilities?
).
to
be
_falsey
expect
(
project
.
configured_to_create_issues_from_vulnerabilities?
).
to
be
false
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