Sha256: 42d370f22b8ecb9bb382f8cd383b21b603ac50daab3caa7aaa82a6340838be59
Contents?: true
Size: 761 Bytes
Versions: 30
Compression:
Stored size: 761 Bytes
Contents
# frozen_string_literal: true FactoryBot.define do factory :user do transient do exhibit { FactoryBot.create(:exhibit) } end sequence(:email) { |n| "user#{n}@example.com" } password { 'insecure' } factory :site_admin do after(:create) do |user, _evaluator| user.roles.create role: 'admin', resource: Spotlight::Site.instance end end factory :exhibit_admin do after(:create) do |user, evaluator| user.roles.create role: 'admin', resource: evaluator.exhibit end end factory :exhibit_curator do after(:create) do |user, evaluator| user.roles.create role: 'curator', resource: evaluator.exhibit end end factory :exhibit_visitor do end end end
Version data entries
30 entries across 30 versions & 1 rubygems