Sha256: 176522e4acd4551f4993e69f659d1e04eff3c5342b80c65238fac498ad75b4b2

Contents?: true

Size: 550 Bytes

Versions: 2

Compression:

Stored size: 550 Bytes

Contents

FactoryGirl.define do
  factory :user do
    sequence(:email) { |n| "user#{n}@example.com" }
    password "insecure"

    factory :exhibit_admin do
      after(:create) do |user, evaluator|
        create_list(:role, 1, user: user, exhibit: Spotlight::Exhibit.default, role: 'admin')
      end
    end
    factory :exhibit_curator do
      after(:create) do |user, evaluator|
        create_list(:role, 1, user: user, exhibit: Spotlight::Exhibit.default, role: 'curate')
      end
    end

    factory :exhibit_visitor do
      
    end
  end
end
  

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blacklight-spotlight-0.0.2 spec/factories/users.rb
blacklight-spotlight-0.0.1 spec/factories/users.rb