summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-02 15:55:38 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-06-03 11:34:36 +0200
commit07af37a243ea0d6b5741754ea116044ee46614b3 (patch)
treed0fe16b71a7837fe9927c541cb9d3286845d235f /spec/services
parent53fe06efde46acd2df62f818c421ecf3a0b971c9 (diff)
downloadgitlab-ce-07af37a243ea0d6b5741754ea116044ee46614b3.tar.gz
Do not create pipeline objects when no builds
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/create_builds_service_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/services/ci/create_builds_service_spec.rb b/spec/services/ci/create_builds_service_spec.rb
index ecc3a88a262..8e737fd44f9 100644
--- a/spec/services/ci/create_builds_service_spec.rb
+++ b/spec/services/ci/create_builds_service_spec.rb
@@ -9,7 +9,7 @@ describe Ci::CreateBuildsService, services: true do
#
subject do
- described_class.new(commit).execute(commit, nil, user, status)
+ described_class.new(commit).execute('test', user, status, nil)
end
context 'next builds available' do
@@ -17,6 +17,10 @@ describe Ci::CreateBuildsService, services: true do
it { is_expected.to be_an_instance_of Array }
it { is_expected.to all(be_an_instance_of Ci::Build) }
+
+ it 'does not persist created builds' do
+ expect(subject.first).not_to be_persisted
+ end
end
context 'builds skipped' do