Commit 364072b7 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Return a builds array in builds create service

parent 90a6783d
......@@ -34,6 +34,7 @@ module Ci
build = commit.builds.create!(build_attrs)
build.execute_hooks
build
end
end
end
......
require 'spec_helper'
describe Ci::CreateBuildsService, services: true do
let(:commit) { create(:ci_commit) }
let(:user) { create(:user) }
describe '#execute' do
subject do
described_class.new.execute(commit, stage, 'master', nil, user, nil, status)
end
context 'stubbed .gitlab-ci.yml' do
let(:stage) { 'test' }
let(:status) { 'success' }
it { is_expected.to be_an_instance_of Array }
it { is_expected.to all(be_an_instance_of Ci::Build) }
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment