Commit 7f6e0c84 authored by Vladimir Shushlin's avatar Vladimir Shushlin

Treat "" as nil for external commit status description

parent ffc9fe49
......@@ -6,7 +6,7 @@ module Gitlab
module External
module Common
def label
subject.description || super
subject.description.presence || super
end
def has_details?
......
......@@ -21,13 +21,21 @@ describe Gitlab::Ci::Status::External::Common do
expect(subject.label).to eq external_description
end
context 'when description is not set' do
context 'when description is nil' do
let(:external_description) { nil }
it 'uses core status label' do
expect(subject.label).to eq('passed')
end
end
context 'when description is empty string' do
let(:external_description) { '' }
it 'uses core status label' do
expect(subject.label).to eq('passed')
end
end
end
describe '#has_action?' do
......
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