FactoryBot.define do

  sequence :email do |n|
    "user#{n}@example.com"
  end

  factory :user do
    email
    password 'password'
    role_names %w[read-class-WorkflowInstance]
  end

  factory :admin, class: User do
    email 'admin@example.com'
    password 'password'
    admin true
  end

end

