Commit 1ea63c3e authored by Kerri Miller's avatar Kerri Miller

Update predicate methods to use more compact formulation

parent b4da574a
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment