2015-10-19 07:23:49 +00:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :user do
|
2015-12-21 02:59:09 +00:00
|
|
|
sequence(:name) { |n| "Cool User ##{n}" }
|
|
|
|
sequence(:email) { |n| "cooluser#{n}@cooldomain.com" }
|
|
|
|
joinedwithcode { "qwertyui" }
|
2015-10-19 07:23:49 +00:00
|
|
|
password 'omgwtfbbq'
|
2015-12-16 14:33:29 +00:00
|
|
|
|
2015-12-21 02:59:09 +00:00
|
|
|
transient do
|
|
|
|
validate false
|
|
|
|
end
|
|
|
|
|
2015-12-16 14:33:29 +00:00
|
|
|
# bypass validation of the joinedwithcode
|
2015-12-21 02:59:09 +00:00
|
|
|
to_create { |instance| instance.save(validate: instance.validate) }
|
2015-10-19 07:23:49 +00:00
|
|
|
end
|
|
|
|
end
|