diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-09-28 13:57:16 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-10-05 12:30:21 +0300 |
commit | f3ec51beba3f1af68d3238489566bb0bbce869a4 (patch) | |
tree | f1a947c4fc8917417a8a81e885f72ab2346e3a8a /spec/models/concerns | |
parent | d3762c22473867d8543b0bb91fd0c696c7aa65f9 (diff) |
Add a additional scope related to alive CI/CD statuses
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/has_status_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/concerns/has_status_spec.rb b/spec/models/concerns/has_status_spec.rb index a38f2553eb1..6866b43432c 100644 --- a/spec/models/concerns/has_status_spec.rb +++ b/spec/models/concerns/has_status_spec.rb @@ -231,6 +231,18 @@ describe HasStatus do end end + describe '.alive' do + subject { CommitStatus.alive } + + %i[running pending created].each do |status| + it_behaves_like 'containing the job', status + end + + %i[failed success].each do |status| + it_behaves_like 'not containing the job', status + end + end + describe '.created_or_pending' do subject { CommitStatus.created_or_pending } |