Sha256: 0a798c7652aa767af6fdd6294c74f0801ca57f19f9e58bbc711428b2f5024463

Contents?: true

Size: 1.68 KB

Versions: 75

Compression:

Stored size: 1.68 KB

Contents

# frozen_string_literal: true

# == Schema Information
#
# Table name: users
#
#  id                     :bigint           not null, primary key
#  confirmation_sent_at   :datetime
#  confirmation_token     :string
#  confirmed_at           :datetime
#  current_sign_in_at     :datetime
#  current_sign_in_ip     :string
#  discarded_at           :datetime
#  email                  :string           default(""), not null
#  encrypted_password     :string           default(""), not null
#  failed_attempts        :integer          default(0), not null
#  last_sign_in_at        :datetime
#  last_sign_in_ip        :string
#  locked_at              :datetime
#  profiles               :integer          default([]), not null, is an Array
#  remember_created_at    :datetime
#  reset_password_sent_at :datetime
#  reset_password_token   :string
#  sign_in_count          :integer          default(0), not null
#  unconfirmed_email      :string
#  unlock_token           :string
#  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
#  index_users_on_unlock_token          (unlock_token) UNIQUE
#

FactoryBot.define do
  factory :user, class: 'User' do
    nombre { Faker::Name.name }
    apellido { Faker::Name.name }
    email { Faker::Internet.email }
    password { "password#{rand(99_999)}" }
    confirmed_at { Faker::Date.backward }

    trait :admin do
      developer { true }
    end

    trait :developer do
      developer { true }
    end
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
pg_rails-7.1.1.pre.4 pg_engine/spec/factories/users.rb
pg_rails-7.1.1.pre.3 pg_engine/spec/factories/users.rb
pg_rails-7.1.1.pre.2 pg_engine/spec/factories/users.rb
pg_rails-7.1.1.pre.1 pg_engine/spec/factories/users.rb
pg_rails-7.1.0 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.112 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.111 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.110 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.109 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.108 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.107 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.106 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.105 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.104 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.103 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.102 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.101 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.100 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.99 pg_engine/spec/factories/users.rb
pg_rails-7.0.8.pre.alpha.98 pg_engine/spec/factories/users.rb