From 0b5e1392782b23650cd70ff15388af2e52a4d2b0 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 20 Mar 2017 20:28:37 +0100 Subject: [PATCH] Extend compound status for manual actions specs --- spec/models/concerns/has_status_spec.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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),