Commit b50bfb04 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix indentation offenses in ensure stage service

parent 538ad92a
...@@ -10,27 +10,27 @@ describe Ci::EnsureStageService, '#execute' do ...@@ -10,27 +10,27 @@ describe Ci::EnsureStageService, '#execute' do
let(:service) { described_class.new(project, user) } let(:service) { described_class.new(project, user) }
context 'when build has a stage assigned' do context 'when build has a stage assigned' do
it 'does not create a new stage' do it 'does not create a new stage' do
job.assign_attributes(stage_id: stage.id) job.assign_attributes(stage_id: stage.id)
expect { service.execute(job) }.not_to change { Ci::Stage.count } expect { service.execute(job) }.not_to change { Ci::Stage.count }
end end
end end
context 'when build does not have a stage assigned' do context 'when build does not have a stage assigned' do
it 'creates a new stage' do it 'creates a new stage' do
job.assign_attributes(stage_id: nil, stage: 'test') job.assign_attributes(stage_id: nil, stage: 'test')
expect { service.execute(job) }.to change { Ci::Stage.count }.by(1) expect { service.execute(job) }.to change { Ci::Stage.count }.by(1)
end end
end end
context 'when build is invalid' do context 'when build is invalid' do
it 'does not create a new stage' do it 'does not create a new stage' do
job.assign_attributes(stage_id: nil, ref: nil) job.assign_attributes(stage_id: nil, ref: nil)
expect { service.execute(job) }.not_to change { Ci::Stage.count } expect { service.execute(job) }.not_to change { Ci::Stage.count }
end end
end end
context 'when new stage can not be created because of an exception' do context 'when new stage can not be created because of an exception' do
......
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