Files
puzzle-scoreboard/spec/factories/users.rb
sto 8cea403dc9
All checks were successful
CI / scan_ruby (push) Successful in 21s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 37s
Fix account page forms & add account actions rspec
#5
2025-12-10 10:44:03 +01:00

30 lines
878 B
Ruby

# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# admin :boolean default(FALSE), not null
# email_address :string not null
# lang :string default("en")
# password_change_attempt :boolean
# password_digest :string not null
# username :string
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_users_on_email_address (email_address) UNIQUE
#
FactoryBot.define do
factory :user do
username { Faker::Internet.unique.username }
email_address { Faker::Internet.unique.email }
password { Faker::Internet.unique.password(min_length: 12, max_length: 18) }
end
trait :admin do
admin { true }
end
end