tap/spec/factories/users.rb

45 lines
1.1 KiB
Ruby
Raw Normal View History

# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# created_at :datetime
# updated_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default("0"), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string
# last_sign_in_ip :string
# admin :boolean
# dagschotel_id :integer
# avatar_file_name :string
# avatar_content_type :string
# avatar_file_size :integer
# avatar_updated_at :datetime
# orders_count :integer default("0")
# koelkast :boolean default("f")
# provider :string
2015-09-14 17:52:25 +02:00
# name :string
# encrypted_password :string default(""), not null
# private :boolean default("f")
#
require 'faker'
require 'identicon'
2014-11-06 14:46:59 +01:00
FactoryGirl.define do
factory :user do
2015-09-14 20:55:49 +02:00
name { Faker::Name.name }
avatar { Identicon.data_url_for name }
2015-09-04 18:13:58 +02:00
factory :admin do
admin true
end
factory :koelkast do
koelkast true
end
2015-03-03 18:16:05 +01:00
end
2014-11-06 14:46:59 +01:00
end