Sha256: 23ee3c84be51b6648b3db435d0f017528129542ecb31ae4fd17e5e0e50d5fa9d

Contents?: true

Size: 652 Bytes

Versions: 5

Compression:

Stored size: 652 Bytes

Contents

FactoryGirl.define do

  factory :user do
    name 'Micro Helpline'
    email 'mrhalp@mit.edu'

    factory :technician do
      after(:create) do |user, proxy|
        create(:user_role, name: 'Technician', user: user)
      end
    end

    factory :supervisor do
      after(:create) do |user, proxy|
        create(:user_role, name: 'Supervisor', user: user)
      end
    end
  end

  factory :person do
  end

  factory :permission do
    person
    privilege 'Admin'
  end

  factory :user_role do
    user
    name 'Technician'

    factory :technician_role do
    end

    factory :supervisor_role do
      name 'Supervisor'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
guise-0.6.0 spec/factories.rb
guise-0.5.0 spec/factories.rb
guise-0.4.1 spec/factories.rb
guise-0.4.0 spec/factories.rb
guise-0.3.1 spec/factories.rb