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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-17 18:08:37 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-17 18:08:37 +0300
commit37eff29d5ce44899e34c7c2ac319b314f2f26d15 (patch)
treeb74e1632fdb58ea10972f270bfec70a4e6ee07b0 /spec/models/commit_status_spec.rb
parent9411a664118a3247d0a56baf7e7ef4549c1201c3 (diff)
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.rb36
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? }