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),