diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-08-31 16:03:41 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-05 08:30:28 +0300 |
commit | 1d7c0390722c96aa66af5b26f5a826b97293dcd6 (patch) | |
tree | ff1795a881ac9a4fa455552ef5dd076f2978d8e2 /spec/models/commit_status_spec.rb | |
parent | b1af1f268b97c8518bf2806bca48f49174a8aead (diff) |
Fix enum lists
Diffstat (limited to 'spec/models/commit_status_spec.rb')
-rw-r--r-- | spec/models/commit_status_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index f7583645e69..4fd330ab7dc 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -443,4 +443,24 @@ describe CommitStatus do end end end + + describe 'set failure_reason when drop' do + let(:build) { create(:ci_build, :created) } + + before do + build.drop!(reason) + end + + context 'when failure_reason is nil' do + let(:reason) { } + + it { expect(build).to be_unknown_failure } + end + + context 'when failure_reason is job_failure' do + let(:reason) { :job_failure } + + it { expect(build).to be_job_failure } + end + end end |