Sha256: 4a3f6b332b7c311a32d4ecc889597fccba390caf829624cf966561ba6c1634bf

Contents?: true

Size: 640 Bytes

Versions: 21

Compression:

Stored size: 640 Bytes

Contents

module Pageflow
  FactoryGirl.define do
    sequence :email do |n|
      "person#{n}@example.com"
    end

    factory :user do
      email
      first_name 'John'
      last_name 'Doe'

      password '@qwert12345'
      password_confirmation { password }

      account

      trait :editor do
      end

      trait :account_manager do
        role 'account_manager'
      end

      trait :admin do
        role 'admin'
      end

      trait :suspended do
        suspended_at { 1.hour.ago }
      end
    end

    factory :valid_user, :class => User do
      email
      first_name "Edison"
      last_name "Editor"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pageflow-0.11.4 spec/factories/users.rb
pageflow-0.11.3 spec/factories/users.rb
pageflow-0.11.2 spec/factories/users.rb
pageflow-0.11.1 spec/factories/users.rb
pageflow-0.11.0 spec/factories/users.rb
pageflow-0.10.0 spec/factories/users.rb
pageflow-0.9.2 spec/factories/users.rb
pageflow-0.9.1 spec/factories/users.rb
pageflow-0.9.0 spec/factories/users.rb
pageflow-0.8.2 spec/factories/users.rb
pageflow-0.8.1 spec/factories/users.rb
pageflow-0.8.0 spec/factories/users.rb
pageflow-0.7.2 spec/factories/users.rb
pageflow-0.7.1 spec/factories/users.rb
pageflow-0.7.0 spec/factories/users.rb
pageflow-0.6.0 spec/factories/users.rb
pageflow-0.5.0 spec/factories/users.rb
pageflow-0.4.0 spec/factories/users.rb
pageflow-0.3.0 spec/factories/users.rb
pageflow-0.2.1 spec/factories/users.rb