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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-10-03 14:18:59 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-10-05 12:41:16 +0300
commit123da5fbe8f5dee13278b1ef9aff79ff9adcef90 (patch)
tree56699ba3c224a514458bb4f08580a866ebac4825 /spec/serializers
parentffce9fd53f4e7d400d6f45e00b7e59acd902f3a6 (diff)
Improve specs for pipeline failure reason presenter
Conflicts: app/presenters/ci/pipeline_presenter.rb
Diffstat (limited to 'spec/serializers')
-rw-r--r--spec/serializers/pipeline_entity_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/serializers/pipeline_entity_spec.rb b/spec/serializers/pipeline_entity_spec.rb
index f8df461bc81..248552d1858 100644
--- a/spec/serializers/pipeline_entity_spec.rb
+++ b/spec/serializers/pipeline_entity_spec.rb
@@ -108,5 +108,18 @@ describe PipelineEntity do
expect(subject[:ref][:path]).to be_nil
end
end
+
+ context 'when pipeline has a failure reason set' do
+ let(:pipeline) { create(:ci_empty_pipeline) }
+
+ before do
+ pipeline.drop!(:config_error)
+ end
+
+ it 'has a correct failure reason' do
+ expect(subject[:failure_reason])
+ .to eq 'CI/CD YAML configuration error!'
+ end
+ end
end
end