diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 15:08:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 15:08:01 +0300 |
commit | c6373a2cec855c6543a1e035c52099e102dd05ef (patch) | |
tree | 507c4d975e1bf559a008d997ad4b07dad14f397e /spec/models/ci/pipeline_spec.rb | |
parent | 6593f1f627938f22090dec5221476772d3ed581d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/pipeline_spec.rb')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 286d2ac4fe6..b30e88532e1 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -1750,7 +1750,7 @@ describe Ci::Pipeline, :mailer do subject { described_class.bridgeable_statuses } it { is_expected.to be_an(Array) } - it { is_expected.not_to include('created', 'preparing', 'pending') } + it { is_expected.not_to include('created', 'waiting_for_resource', 'preparing', 'pending') } end describe '#status', :sidekiq_might_not_need_inline do @@ -1760,6 +1760,17 @@ describe Ci::Pipeline, :mailer do subject { pipeline.reload.status } + context 'on waiting for resource' do + before do + allow(build).to receive(:requires_resource?) { true } + allow(Ci::ResourceGroups::AssignResourceFromResourceGroupWorker).to receive(:perform_async) + + build.enqueue + end + + it { is_expected.to eq('waiting_for_resource') } + end + context 'on prepare' do before do # Prevent skipping directly to 'pending' |