diff options
author | Stan Hu <stanhu@gmail.com> | 2017-05-28 23:41:29 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-05-28 23:41:29 -0700 |
commit | 393f24ad8c90b68b10e78fcf6dd8b3fa4fb93c4e (patch) | |
tree | aa2603230207fc8b4440a55e5c8d962fbf79e390 | |
parent | af0411313571bf69f956c52e17b8da578edf1fbf (diff) | |
download | gitlab-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.rb | 2 |
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 |