summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-05-28 23:41:29 -0700
committerStan Hu <stanhu@gmail.com>2017-05-28 23:41:29 -0700
commit393f24ad8c90b68b10e78fcf6dd8b3fa4fb93c4e (patch)
treeaa2603230207fc8b4440a55e5c8d962fbf79e390
parentaf0411313571bf69f956c52e17b8da578edf1fbf (diff)
downloadgitlab-ce-393f24ad8c90b68b10e78fcf6dd8b3fa4fb93c4e.tar.gz
Simplify pipeline spec by using order instead of sort_bysh-fix-issue-33011
-rw-r--r--spec/requests/api/pipelines_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb
index 07fa0e3f526..689eea6506d 100644
--- a/spec/requests/api/pipelines_spec.rb
+++ b/spec/requests/api/pipelines_spec.rb
@@ -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