Commit b35e6249 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix pipeline processing specs after adding ability checks

parent 6f9b4583
require 'spec_helper' require 'spec_helper'
describe Ci::ProcessPipelineService, services: true do describe Ci::ProcessPipelineService, :services do
let(:pipeline) { create(:ci_empty_pipeline, ref: 'master') }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:empty_project) }
let(:pipeline) do
create(:ci_empty_pipeline, ref: 'master', project: project)
end
before do
project.team << [user, :developer]
end
describe '#execute' do describe '#execute' do
context 'start queuing next builds' do context 'start queuing next builds' do
...@@ -285,7 +293,7 @@ describe Ci::ProcessPipelineService, services: true do ...@@ -285,7 +293,7 @@ describe Ci::ProcessPipelineService, services: true do
expect(builds.pluck(:name)) expect(builds.pluck(:name))
.to contain_exactly('build:1', 'build:2', 'test:1', 'test:2') .to contain_exactly('build:1', 'build:2', 'test:1', 'test:2')
Ci::Build.retry(pipeline.builds.find_by(name: 'test:2')).success Ci::Build.retry(pipeline.builds.find_by(name: 'test:2'), user).success
expect(builds.pluck(:name)).to contain_exactly( expect(builds.pluck(:name)).to contain_exactly(
'build:1', 'build:2', 'test:1', 'test:2', 'test:2', 'deploy:1', 'deploy:2') 'build:1', 'build:2', 'test:1', 'test:2', 'test:2', 'deploy:1', 'deploy:2')
......
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