Sha256: 7218c68079e6d8ff8788be2e2ad65585fadfca164af0987535855a33e3cc74ff
Contents?: true
Size: 812 Bytes
Versions: 2
Compression:
Stored size: 812 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
devise-token_authenticatable-0.4.10 | spec/factories/user.rb |
devise-token_authenticatable-0.4.9 | spec/factories/user.rb |