From 1c7eb963f5e9b5992e55a3dd0a025f019d72c84b Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 19 Jan 2017 16:55:52 +0100 Subject: [PATCH] Add missing build_spec --- spec/models/ci/build_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 3309a7fff9f..f031876e812 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1401,4 +1401,14 @@ describe Ci::Build, :models do it { is_expected.to eq(%w[predefined project pipeline yaml secret]) } end end + + describe 'State transition: any => [:pending]' do + let(:build) { create(:ci_build, :created) } + + it 'queues BuildQueueWorker' do + expect(BuildQueueWorker).to receive(:perform_async).with(build.id) + + build.enqueue + end + end end