summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authordrew cimino <dcimino@gitlab.com>2019-04-11 16:21:18 +0100
committerdrew cimino <dcimino@gitlab.com>2019-06-04 20:25:26 -0500
commit42d6d3187fb7305daead326bfdf56a09c249f829 (patch)
tree5522fd8f7894f2913d27b691f1662e85b38aaa7f /spec/finders
parentebc18b45c7e72b28c1981446c95433611903868d (diff)
downloadgitlab-ce-42d6d3187fb7305daead326bfdf56a09c249f829.tar.gz
preventing blocked users and their PipelineSchdules from creating new Pipelines
updated several specs and factories to accomodate new permissions
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)