Commit 393f24ad authored by Stan Hu's avatar Stan Hu

Simplify pipeline spec by using order instead of sort_by

parent af041131
......@@ -241,7 +241,7 @@ describe API::Pipelines do
expect(response).to include_pagination_headers
expect(json_response).not_to be_empty
pipeline_ids = Ci::Pipeline.all.sort_by { |p| p.user.id }.map(&:id)
pipeline_ids = Ci::Pipeline.all.order(:user_id).map(&:id)
expect(json_response.map { |r| r['id'] }).to eq(pipeline_ids)
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