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-21 14:08:42 +0300
committerVladimir Shushlin <vshushlin@gitlab.com>2019-01-21 17:16:22 +0300
commitffc9fe49a15e68c8251082fa6ac75a57350640ed (patch)
treed82389770005ab329bc8b71fe918fababc39627c /spec/lib/gitlab/ci/status
parent93a93174c2978834d529f7ee5f1d62682ee5a536 (diff)
Fix empty labels for `pages:deploy` job
Use description of GenericCommitStatus as label if provided Fallback to core status labels if not
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 40871f86568..44e73eadc72 100644
--- a/spec/lib/gitlab/ci/status/external/common_spec.rb
+++ b/spec/lib/gitlab/ci/status/external/common_spec.rb
@@ -11,7 +11,7 @@ describe Gitlab::Ci::Status::External::Common do
end
subject do
- Gitlab::Ci::Status::Core
+ Gitlab::Ci::Status::Success
.new(external_status, user)
.extend(described_class)
end
@@ -20,6 +20,14 @@ describe Gitlab::Ci::Status::External::Common do
it 'returns description' do
expect(subject.label).to eq external_description
end
+
+ context 'when description is not set' do
+ let(:external_description) { nil }
+
+ it 'uses core status label' do
+ expect(subject.label).to eq('passed')
+ end
+ end
end
describe '#has_action?' do