Commit 6a5d8499 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Small code improvements

Addressing code review comments
parent 043e78dd
......@@ -644,7 +644,7 @@ module EE
end
def alerts_service_activated?
alerts_service_available? && alerts_service.try(:active?)
alerts_service_available? && alerts_service&.active?
end
def package_already_taken?(package_name)
......
......@@ -22,9 +22,7 @@ describe Issue do
context 'when the author is Alert Bot' do
it 'updates issue title with the IID' do
issue.save
expect(issue.reload.title).to eq("New: Incident 503503")
expect { issue.save }.to change { issue.title }.to("New: Incident 503503")
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