summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-20 20:28:37 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-20 20:28:37 +0100
commit0b5e1392782b23650cd70ff15388af2e52a4d2b0 (patch)
tree50ecbd31646e14d7a03afe776fa182b881e0d263 /spec/models/concerns
parentf441b95bb3f1101ff0812e72c20a040e344ae762 (diff)
downloadgitlab-ce-0b5e1392782b23650cd70ff15388af2e52a4d2b0.tar.gz
Extend compound status for manual actions specs
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/has_status_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/models/concerns/has_status_spec.rb b/spec/models/concerns/has_status_spec.rb
index f4a7446e662..82abad0e2f6 100644
--- a/spec/models/concerns/has_status_spec.rb
+++ b/spec/models/concerns/has_status_spec.rb
@@ -110,7 +110,7 @@ describe HasStatus do
it { is_expected.to eq 'running' }
end
- context 'when pipeline is in transition between stages' do
+ context 'when one status finished and second is still created' do
let!(:statuses) do
[create(type, status: :success), create(type, status: :created)]
end
@@ -118,6 +118,16 @@ describe HasStatus do
it { is_expected.to eq 'running' }
end
+ context 'when there is a manual status before created status' do
+ let!(:statuses) do
+ [create(type, status: :success),
+ create(type, status: :manual, allow_failure: false),
+ create(type, status: :created)]
+ end
+
+ it { is_expected.to eq 'manual' }
+ end
+
context 'when one status is a blocking manual action' do
let!(:statuses) do
[create(type, status: :failed),