summaryrefslogtreecommitdiff
path: root/spec/factories/users.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/factories/users.rb')
-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 9b5e4a981a0..476c57f2d80 100644
--- a/spec/factories/users.rb
+++ b/spec/factories/users.rb
@@ -27,6 +27,10 @@ FactoryBot.define do
after(:build) { |user, _| user.block_pending_approval! }
end
+ trait :banned do
+ after(:build) { |user, _| user.ban! }
+ end
+
trait :ldap_blocked do
after(:build) { |user, _| user.ldap_block! }
end
@@ -80,6 +84,12 @@ FactoryBot.define do
last_sign_in_ip { '127.0.0.1' }
end
+ trait :with_credit_card_validation do
+ after :create do |user|
+ create :credit_card_validation, user: user
+ end
+ end
+
trait :two_factor_via_otp do
before(:create) do |user|
user.otp_required_for_login = true