提交 393f24ad 编写于 作者: S Stan Hu

Simplify pipeline spec by using order instead of sort_by

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册