diff options
author | Tiger <twatson@gitlab.com> | 2019-03-27 07:01:35 +0300 |
---|---|---|
committer | Tiger <twatson@gitlab.com> | 2019-04-02 03:07:06 +0300 |
commit | 02b9b5facf0496f7c64a7913cc4f4c8437527f72 (patch) | |
tree | fa77235e436e22112839c252d877516358d8b60f /spec/serializers/build_details_entity_spec.rb | |
parent | de03a8bcb45f11a50bee071e977274c113e7b39a (diff) |
Expose build failure reason
We can use this to show more informative error messages with
links to documentation etc.
Diffstat (limited to 'spec/serializers/build_details_entity_spec.rb')
-rw-r--r-- | spec/serializers/build_details_entity_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/serializers/build_details_entity_spec.rb b/spec/serializers/build_details_entity_spec.rb index f6bd6e9ede4..1edf69dc290 100644 --- a/spec/serializers/build_details_entity_spec.rb +++ b/spec/serializers/build_details_entity_spec.rb @@ -112,5 +112,15 @@ describe BuildDetailsEntity do expect(subject['merge_request_path']).to be_nil end end + + context 'when the build has failed' do + let(:build) { create(:ci_build, :created) } + + before do + build.drop!(:unmet_prerequisites) + end + + it { is_expected.to include(failure_reason: 'unmet_prerequisites') } + end end end |