diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-01-19 16:55:52 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-01-19 16:55:52 +0100 |
commit | 1c7eb963f5e9b5992e55a3dd0a025f019d72c84b (patch) | |
tree | 8a0badaba061ef0d7d6fba23097c95e9078f6676 /spec | |
parent | 8171a1932b3c5e55ad3ea8402ac68ff14692ca32 (diff) | |
download | gitlab-ce-1c7eb963f5e9b5992e55a3dd0a025f019d72c84b.tar.gz |
Add missing build_spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/build_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
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 |