diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-08-10 16:45:14 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-08-10 16:45:14 +0300 |
commit | 33311cb677592e58c05e4da3cd511bef246fc9d7 (patch) | |
tree | 515e09c97655aa76c0a12259c3f4e0227a716084 /spec/services/ci | |
parent | 91795dcd1c0d12d2350e0d00489d89be9fa29b32 (diff) |
CE Port of Protected Environments backend
Diffstat (limited to 'spec/services/ci')
-rw-r--r-- | spec/services/ci/enqueue_build_service_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/ci/enqueue_build_service_spec.rb b/spec/services/ci/enqueue_build_service_spec.rb new file mode 100644 index 00000000000..e41b8e4800b --- /dev/null +++ b/spec/services/ci/enqueue_build_service_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +require 'spec_helper' + +describe Ci::EnqueueBuildService, '#execute' do + let(:user) { create(:user) } + let(:project) { create(:project) } + let(:ci_build) { create(:ci_build, :created) } + + subject { described_class.new(project, user).execute(ci_build) } + + it 'enqueues the build' do + subject + + expect(ci_build.pending?).to be_truthy + end +end |