Sha256: 52a5a40fc38f2bafc7ec611256a41093d18388819c7bee15b5fcdfd052ca376c
Contents?: true
Size: 811 Bytes
Versions: 8
Compression:
Stored size: 811 Bytes
Contents
FactoryGirl.define do factory :user do username 'testuser' sequence(:email) { |n| "user#{n}@domain.com" } password 'some_password' password_confirmation 'some_password' facebook_token { SecureRandom.hex } ignore do confirm_account true end after(:create) do |u, evaluator| u.confirm if evaluator.confirm_account end trait :with_reset_password_token do reset_password_token { SecureRandom.hex } end trait :with_authentication_token do authentication_token { SecureRandom.hex } authentication_token_created_at { Time.now } end trait :with_day_old_token do authentication_token { SecureRandom.hex } authentication_token_created_at { Time.now - 1.day } end end end
Version data entries
8 entries across 8 versions & 1 rubygems