21
1
Fork 0
mirror of https://github.com/Evolix/chexpire.git synced 2024-05-05 10:15:09 +02:00
chexpire/test/factories/users.rb
Colin Darie ea610ee185
Notifications grouped of checks in error to user email.
This is not dependent of Notificatioon model.
2018-08-01 23:09:08 +02:00

49 lines
1.5 KiB
Ruby

# == Schema Information
#
# Table name: users
#
# id :bigint(8) not null, primary key
# confirmation_sent_at :datetime
# confirmation_token :string(255)
# confirmed_at :datetime
# current_sign_in_at :datetime
# current_sign_in_ip :string(255)
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# last_sign_in_at :datetime
# last_sign_in_ip :string(255)
# locale :string(5) default("en"), not null
# notifications_enabled :boolean default(TRUE), not null
# remember_created_at :datetime
# reset_password_sent_at :datetime
# reset_password_token :string(255)
# sign_in_count :integer default(0), not null
# tos_accepted :boolean default(FALSE), not null
# unconfirmed_email :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
# index_users_on_confirmation_token (confirmation_token) UNIQUE
# index_users_on_email (email) UNIQUE
# index_users_on_reset_password_token (reset_password_token) UNIQUE
#
require "securerandom"
FactoryBot.define do
factory :user do
sequence(:email) { |n| "user-#{n}@chexpire.org" }
password "password"
confirmed_at Time.new(2018, 4, 1, 12, 0, 0, "+02:00")
notifications_enabled true
locale "en"
tos_accepted true
trait :fr do
locale "fr"
end
end
end