Fix intermittent spec failures in spec/finders/pipelines_finder_spec.rb

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.
This commit is contained in:
Stan Hu 2017-06-15 21:38:02 -07:00
parent ae9d191e56
commit 14e7b3bfcc
1 changed files with 1 additions and 1 deletions

View File

@ -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)