Sha256: 439cdeea746e3329791950e40ed778572186067d69e4296d738f25b70389635b

Contents?: true

Size: 794 Bytes

Versions: 2

Compression:

Stored size: 794 Bytes

Contents

FactoryGirl.define do
  factory :user, class: Answers::User do
    sequence(:email) { |n| "person#{n}@example.com" }
    password                 "Mahalo43"
    password_confirmation    "Mahalo43"
    is_editor                true
    is_writer                true
    is_admin                 false

    factory :admin do
      is_admin               true
    end

    factory :editor do
      is_editor              true
      is_writer              false
      is_admin               false
    end

    factory :writer do
      is_writer              true
      is_editor              false
      is_admin               false
    end

    factory :user_no_abilities do
      is_writer              false
      is_editor              false
      is_admin               false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
answers-core-0.0.0.2 spec/factories/user.rb
answers-core-0.0.0 spec/factories/user.rb