Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/users.rb')
-rw-r--r--spec/factories/users.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
index d61d5cc2d78..de2b5159fe7 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -48,6 +48,15 @@ FactoryBot.define do
after(:build) { |user, _| user.ban! }
end
+ trait :trusted do
+ after(:create) do |user, _|
+ user.custom_attributes.create!(
+ key: UserCustomAttribute::TRUSTED_BY,
+ value: "placeholder"
+ )
+ end
+ end
+
trait :ldap_blocked do
after(:build) { |user, _| user.ldap_block! }
end