Sha256: 70aacebfb2e4b425cbf9ae0ea6be4c867a642dbac08f7bb6664519e7f5ee415e

Contents?: true

Size: 446 Bytes

Versions: 15

Compression:

Stored size: 446 Bytes

Contents

FactoryBot.define do
  factory :user do
    sequence :email do |n|
      "foo#{n}@example.com"
    end
    password { "password" }
    role { :user }

    factory :admin do
      sequence :email do |n|
        "admin#{n}@example.com"
      end
      role { :admin }
    end

    factory :limited_access_admin do
      sequence :email do |n|
        "limited_admin#{n}@example.com"
      end
      role { :admin_limited_access }
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hackathon_manager-0.14.1 test/factories/users.rb
hackathon_manager-0.14.0 test/factories/users.rb
hackathon_manager-0.13.12 test/factories/users.rb
hackathon_manager-0.13.11 test/factories/users.rb
hackathon_manager-0.13.10 test/factories/users.rb
hackathon_manager-0.13.9 test/factories/users.rb
hackathon_manager-0.13.8 test/factories/users.rb
hackathon_manager-0.13.7 test/factories/users.rb
hackathon_manager-0.13.6 test/factories/users.rb
hackathon_manager-0.13.5 test/factories/users.rb
hackathon_manager-0.13.4 test/factories/users.rb
hackathon_manager-0.13.3 test/factories/users.rb
hackathon_manager-0.13.2 test/factories/users.rb
hackathon_manager-0.13.1 test/factories/users.rb
hackathon_manager-0.13.0 test/factories/users.rb