diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 15:08:37 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 15:08:37 +0000 |
commit | 37eff29d5ce44899e34c7c2ac319b314f2f26d15 (patch) | |
tree | b74e1632fdb58ea10972f270bfec70a4e6ee07b0 /spec/models/commit_status_spec.rb | |
parent | 9411a664118a3247d0a56baf7e7ef4549c1201c3 (diff) | |
download | gitlab-ce-37eff29d5ce44899e34c7c2ac319b314f2f26d15.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/commit_status_spec.rb')
-rw-r--r-- | spec/models/commit_status_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/models/commit_status_spec.rb b/spec/models/commit_status_spec.rb index 98dc6f00412..40652614101 100644 --- a/spec/models/commit_status_spec.rb +++ b/spec/models/commit_status_spec.rb @@ -63,6 +63,42 @@ describe CommitStatus do end end + describe '#processed' do + subject { commit_status.processed } + + context 'when ci_atomic_processing is disabled' do + before do + stub_feature_flags(ci_atomic_processing: false) + + commit_status.save! + end + + it { is_expected.to be_nil } + end + + context 'when ci_atomic_processing is enabled' do + before do + stub_feature_flags(ci_atomic_processing: true) + end + + context 'status is latest' do + before do + commit_status.update!(retried: false, status: :pending) + end + + it { is_expected.to be_falsey } + end + + context 'status is retried' do + before do + commit_status.update!(retried: true, status: :pending) + end + + it { is_expected.to be_truthy } + end + end + end + describe '#started?' do subject { commit_status.started? } |