Commit 3b612fe2 authored by Mike Greiling's avatar Mike Greiling

add tests for pipeline performance_artifact method

parent bb9d1da1
...@@ -43,6 +43,34 @@ describe Ci::Pipeline do ...@@ -43,6 +43,34 @@ describe Ci::Pipeline do
end end
end end
describe '#performance_artifact' do
context 'has performance job' do
let!(:build) do
create(
:ci_build,
:artifacts,
name: 'performance',
pipeline: pipeline,
options: {
artifacts: {
paths: ['performance.json']
}
}
)
end
it { expect(pipeline.performance_artifact).to eq(build) }
end
context 'no performance job' do
before do
create(:ci_build, pipeline: pipeline)
end
it { expect(pipeline.performance_artifact).to be_nil }
end
end
describe '#sast_artifact' do describe '#sast_artifact' do
context 'has sast job' do context 'has sast job' do
let!(:build) do let!(:build) 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