Skip to content
Snippets Groups Projects
Commit e300e9d5 authored by Stan Hu's avatar Stan Hu
Browse files

Improve PipelinesFinder spec so that it does not depend on hard-coded database IDs

parent 796bdf1d
No related branches found
No related tags found
No related merge requests found
Loading
@@ -43,9 +43,10 @@ describe PipelinesFinder do
Loading
@@ -43,9 +43,10 @@ describe PipelinesFinder do
let(:params) { { scope: 'running' } } let(:params) { { scope: 'running' } }
   
it 'orders in descending order on ID' do it 'orders in descending order on ID' do
create(:ci_pipeline, project: project, ref: 'feature') feature_pipeline = create(:ci_pipeline, project: project, ref: 'feature')
   
expect(subject.map(&:id)).to eq [3, 2, 1] expected_ids = [feature_pipeline.id, branch_pipeline.id, tag_pipeline.id].sort.reverse
expect(subject.map(&:id)).to eq expected_ids
end end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment