Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Shushlin <vshushlin@gitlab.com>2019-01-22 15:14:29 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2019-01-22 15:17:30 +0300
commit7f6e0c84f8b9beb1875e28aca982c0ada79d4242 (patch)
tree2d5be2c50305d54b026ca0ad7347a8733df1d5e4 /spec/lib/gitlab/ci/status
parentffc9fe49a15e68c8251082fa6ac75a57350640ed (diff)
Treat "" as nil for external commit status description
Diffstat (limited to 'spec/lib/gitlab/ci/status')
-rw-r--r--spec/lib/gitlab/ci/status/external/common_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/status/external/common_spec.rb b/spec/lib/gitlab/ci/status/external/common_spec.rb
index 44e73eadc72..0d02c371a92 100644
--- a/spec/lib/gitlab/ci/status/external/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/external/common_spec.rb
@@ -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