Sha256: 80767b92d1fe7fdfd92c06a9f1e7955d8c20c501d8bb8c9b1cf73900894ae18c

Contents?: true

Size: 399 Bytes

Versions: 19

Compression:

Stored size: 399 Bytes

Contents

unless Factory.factories.keys.include?(:user)
  Factory.define(:user) do |f|
    f.email { Faker::Internet.email }
    f.password "spree123"
    f.password_confirmation "spree123"
  end
end

Factory.define(:admin_user, :parent => :user) do |u|
  u.roles { [Role.find_by_name("admin") || Factory(:role, :name => "admin")]}
end

Factory.sequence :login do |n|
  Faker::Internet.user_name + n.to_s
end

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
apispree_core-0.0.0 lib/spree_core/testing_support/factories/user_factory.rb
My-Commerce_core-1.1.0 lib/spree_core/testing_support/factories/user_factory.rb
My-Commerce_core-1.0.0 lib/spree_core/testing_support/factories/user_factory.rb
MyCommerceapi-1.0.0 core/lib/spree_core/testing_support/factories/user_factory.rb
MyCommerce-0.0.3 core/lib/spree_core/testing_support/factories/user_factory.rb
rfcommerce_core-0.0.3 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.6 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.5 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.50.4 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.4 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.50.3 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.3 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.2 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.1 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.0 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.60.0.RC1 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.50.2 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.50.1 lib/spree_core/testing_support/factories/user_factory.rb
spree_core-0.50.0 lib/spree_core/testing_support/factories/user_factory.rb