diff options
author | Marin Jankovski <marin@gitlab.com> | 2018-04-12 10:54:48 +0300 |
---|---|---|
committer | Marin Jankovski <marin@gitlab.com> | 2018-04-12 10:54:48 +0300 |
commit | b9d868e33d232808a4c964e2e3e28b4874345e73 (patch) | |
tree | 1332cd623be6c8ea6e7f18c9d00f7c4c86e248cd /spec/lib | |
parent | 85b873e9779a40f88cca95579fe254fbeb695ddc (diff) | |
parent | 11bfc4b29b92a3748423114a0f9576d6b96bc9ff (diff) |
Merge branch 'fix/gb/fix-pipeline-statuses-illustrations' into 'master'
Fix empty state for build that does not have a trace
Closes #45204
See merge request gitlab-org/gitlab-ce!18278
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/ci/status/build/common_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/status/build/factory_spec.rb | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/spec/lib/gitlab/ci/status/build/common_spec.rb b/spec/lib/gitlab/ci/status/build/common_spec.rb index 2cce7a23ea7..ca3c66f0152 100644 --- a/spec/lib/gitlab/ci/status/build/common_spec.rb +++ b/spec/lib/gitlab/ci/status/build/common_spec.rb @@ -38,4 +38,10 @@ describe Gitlab::Ci::Status::Build::Common do expect(subject.details_path).to include "jobs/#{build.id}" end end + + describe '#illustration' do + it 'provides a fallback empty state illustration' do + expect(subject.illustration).not_to be_empty + end + end end diff --git a/spec/lib/gitlab/ci/status/build/factory_spec.rb b/spec/lib/gitlab/ci/status/build/factory_spec.rb index 6d5b73bb01b..d53a7d468e3 100644 --- a/spec/lib/gitlab/ci/status/build/factory_spec.rb +++ b/spec/lib/gitlab/ci/status/build/factory_spec.rb @@ -75,7 +75,8 @@ describe Gitlab::Ci::Status::Build::Factory do it 'matches correct extended statuses' do expect(factory.extended_statuses) - .to eq [Gitlab::Ci::Status::Build::Retryable, Gitlab::Ci::Status::Build::Failed] + .to eq [Gitlab::Ci::Status::Build::Retryable, + Gitlab::Ci::Status::Build::Failed] end it 'fabricates a failed build status' do @@ -94,7 +95,7 @@ describe Gitlab::Ci::Status::Build::Factory do end context 'when build is allowed to fail' do - let(:build) { create(:ci_build, :failed, :allowed_to_fail) } + let(:build) { create(:ci_build, :failed, :allowed_to_fail, :trace_artifact) } it 'matches correct core status' do expect(factory.core_status).to be_a Gitlab::Ci::Status::Failed |