summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-06-15 21:38:02 -0700
committerStan Hu <stanhu@gmail.com>2017-06-15 22:14:00 -0700
commit14e7b3bfcc0092416b819bcdfd36bcc94fd6105b (patch)
treeb8a4ae62903cf545584c119c0634a9075de77163
parentae9d191e566b036798816e5f8bf5ef1dc0ff3e90 (diff)
downloadgitlab-ce-sh-improve-pipelines-finder-spec.tar.gz
Fix intermittent spec failures in spec/finders/pipelines_finder_spec.rbsh-improve-pipelines-finder-spec
The spec was trying to sort pipelines by user ID, but the same user ID was being used for each pipeline in the spec. This is similar to #33001.
-rw-r--r--spec/finders/pipelines_finder_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/finders/pipelines_finder_spec.rb b/spec/finders/pipelines_finder_spec.rb
index f2aeda241c1..2b19cda35b0 100644
--- a/spec/finders/pipelines_finder_spec.rb
+++ b/spec/finders/pipelines_finder_spec.rb
@@ -170,7 +170,7 @@ describe PipelinesFinder do
context 'when order_by and sort are specified' do
context 'when order_by user_id' do
let(:params) { { order_by: 'user_id', sort: 'asc' } }
- let!(:pipelines) { create_list(:ci_pipeline, 2, project: project, user: create(:user)) }
+ let!(:pipelines) { Array.new(2) { create(:ci_pipeline, project: project, user: create(:user)) } }
it 'sorts as user_id: :asc' do
is_expected.to match_array(pipelines)