summaryrefslogtreecommitdiff
path: root/spec/factories
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/factories
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/factories')
-rw-r--r--spec/factories/users.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
index 1d2b724a5e5..4f3392cdcbf 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -66,6 +66,16 @@ FactoryBot.define do
end
end
+ transient do
+ developer_projects []
+ end
+
+ after(:create) do |user, evaluator|
+ evaluator.developer_projects.each do |project|
+ project.add_developer(user)
+ end
+ end
+
factory :omniauth_user do
transient do
extern_uid '123456'