Sha256: 92e700f62d9721b8d784c8e8b6f9a12dd2b5a53569ada20486ebad2bec50a392

Contents?: true

Size: 626 Bytes

Versions: 5

Compression:

Stored size: 626 Bytes

Contents

FactoryGirl.define do
  factory :user do
    email { generate(:email) }
    password '123456'
    password_confirmation '123456'

    factory :default_user do
      confirmed_at 1.hour.ago
      first_name Forgery::Name.first_name
      last_name Forgery::Name.last_name

      factory :admin_user do
        user_role_id UserRoleType.admin.id
      end

      factory :redactor_user do
        user_role_id UserRoleType.redactor.id
      end

      factory :moderator_user do
        user_role_id UserRoleType.moderator.id
      end

      factory :inactive_user do
        locked_at Time.current
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ab_admin-0.7.0 lib/generators/ab_admin/install/templates/spec/factories/user_factory.rb
ab_admin-0.6.1 lib/generators/ab_admin/install/templates/spec/factories/user_factory.rb
ab_admin-0.6.0 lib/generators/ab_admin/install/templates/spec/factories/user_factory.rb
ab_admin-0.5.0 lib/generators/ab_admin/install/templates/spec/factories/user_factory.rb
ab_admin-0.4.0 lib/generators/ab_admin/install/templates/spec/factories/user_factory.rb