summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-01-19 16:55:52 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-01-19 16:55:52 +0100
commit1c7eb963f5e9b5992e55a3dd0a025f019d72c84b (patch)
tree8a0badaba061ef0d7d6fba23097c95e9078f6676 /spec
parent8171a1932b3c5e55ad3ea8402ac68ff14692ca32 (diff)
downloadgitlab-ce-1c7eb963f5e9b5992e55a3dd0a025f019d72c84b.tar.gz
Add missing build_spec
Diffstat (limited to 'spec')
-rw-r--r--spec/models/ci/build_spec.rb10
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