Commit 3a8b9aad authored by Grzegorz Bizon's avatar Grzegorz Bizon

Refactor pipeline specs and remove raise_error warning

parent 5d85a049
...@@ -163,14 +163,14 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do ...@@ -163,14 +163,14 @@ describe Gitlab::Ci::Pipeline::Chain::Populate do
->(pipeline) { pipeline.variables.create!(key: 'VAR', value: '123') } ->(pipeline) { pipeline.variables.create!(key: 'VAR', value: '123') }
end end
it 'raises exception' do it 'wastes pipeline iid' do
expect { step.perform! }.to raise_error(ActiveRecord::RecordNotSaved) expect { step.perform! }.to raise_error(ActiveRecord::RecordNotSaved)
end
it 'wastes pipeline iid' do last_iid = InternalId.ci_pipelines
expect { step.perform! }.to raise_error .where(project_id: project.id)
.last.last_value
expect(InternalId.ci_pipelines.where(project_id: project.id).last.last_value).to be > 0 expect(last_iid).to be > 0
end end
end 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