Sha256: 93a7340b7097355972360bfed4400880d027e8aa81cddf927a03541c9bd0f287
Contents?: true
Size: 592 Bytes
Versions: 15
Compression:
Stored size: 592 Bytes
Contents
FactoryGirl.define do sequence :user_authentication_token do |n| "xxxx#{Time.now.to_i}#{rand(1000)}#{n}xxxxxxxxxxxxx" end factory :user, :class => Spree.user_class do email { Faker::Internet.email } login { email } password 'secret' password_confirmation 'secret' authentication_token { FactoryGirl.generate(:user_authentication_token) } if Spree.user_class.attribute_method? :authentication_token end factory :admin_user, :parent => :user do spree_roles { [Spree::Role.find_by_name('admin') || FactoryGirl.create(:role, :name => 'admin')] } end end
Version data entries
15 entries across 15 versions & 2 rubygems