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.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb
index 7e121b10632..d4b2ac5f056 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -81,6 +81,14 @@ FactoryBot.define do
end
end
+ trait :two_factor_via_webauthn do
+ transient { registrations_count { 5 } }
+
+ after(:create) do |user, evaluator|
+ create_list(:webauthn_registration, evaluator.registrations_count, user: user)
+ end
+ end
+
trait :readme do
project_view { :readme }
end