summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2019-06-17 13:00:34 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2019-06-17 13:00:34 +0000
commite08d13420d3d48524c9b922e2307bfd1d8c765f6 (patch)
tree160c7013f8437ca25f8b766fa915e262e9312457 /spec/finders
parentd87d965e7ffdbb0abc1eea4f0aadd4d0f50f1433 (diff)
parent42d6d3187fb7305daead326bfdf56a09c249f829 (diff)
downloadgitlab-ce-e08d13420d3d48524c9b922e2307bfd1d8c765f6.tar.gz
Merge branch 'error-pipelines-for-blocked-users' into 'master'
Preventing blocked users and their PipelineSchdules from creating new Pipelines Closes #47756 See merge request gitlab-org/gitlab-ce!27318
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/pipelines_finder_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/finders/pipelines_finder_spec.rb b/spec/finders/pipelines_finder_spec.rb
index c2c304589c9..b23fd8ccdc6 100644
--- a/spec/finders/pipelines_finder_spec.rb
+++ b/spec/finders/pipelines_finder_spec.rb
@@ -170,8 +170,9 @@ 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) { Array.new(2) { create(:ci_pipeline, project: project, user: create(:user)) } }
+ let(:params) { { order_by: 'user_id', sort: 'asc' } }
+ let(:users) { Array.new(2) { create(:user, developer_projects: [project]) } }
+ let!(:pipelines) { users.map { |user| create(:ci_pipeline, project: project, user: user) } }
it 'sorts as user_id: :asc' do
is_expected.to match_array(pipelines)