summaryrefslogtreecommitdiff
path: root/spec/presenters
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-10-07 00:27:15 +0900
committerShinya Maeda <shinya@gitlab.com>2017-10-07 00:27:15 +0900
commit830c770a532fc94e1b1a70064500c9bd63712de4 (patch)
tree140141b7c9ac92cdce29e71b6da6f00bcde9f51a /spec/presenters
parent3e26b0dcd113ade77dc8304137c6733cab4c8718 (diff)
parent7f8e720f415ff50f791d9efd49b774c9da9ab109 (diff)
downloadgitlab-ce-830c770a532fc94e1b1a70064500c9bd63712de4.tar.gz
Merge branch 'master' into feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service
Diffstat (limited to 'spec/presenters')
-rw-r--r--spec/presenters/ci/pipeline_presenter_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/presenters/ci/pipeline_presenter_spec.rb b/spec/presenters/ci/pipeline_presenter_spec.rb
index e4886a8f019..f7ceaf844be 100644
--- a/spec/presenters/ci/pipeline_presenter_spec.rb
+++ b/spec/presenters/ci/pipeline_presenter_spec.rb
@@ -51,4 +51,21 @@ describe Ci::PipelinePresenter do
end
end
end
+
+ context '#failure_reason' do
+ context 'when pipeline has failure reason' do
+ it 'represents a failure reason sentence' do
+ pipeline.failure_reason = :config_error
+
+ expect(presenter.failure_reason)
+ .to eq 'CI/CD YAML configuration error!'
+ end
+ end
+
+ context 'when pipeline does not have failure reason' do
+ it 'returns nil' do
+ expect(presenter.failure_reason).to be_nil
+ end
+ end
+ end
end