2015-10-19 07:23:49 +00:00
|
|
|
FactoryGirl.define do
|
|
|
|
factory :user do
|
|
|
|
name { random_string(10) }
|
|
|
|
email { random_string(10) + '@' + random_string(10) + '.com' }
|
|
|
|
code { random_string(8) }
|
2015-12-16 14:16:02 +00:00
|
|
|
joinedwithcode { code }
|
2015-10-19 07:23:49 +00:00
|
|
|
password 'omgwtfbbq'
|
2015-12-16 14:16:02 +00:00
|
|
|
to_create {|instance| instance.save(validate: false) } # bypass validation of the joinedwithcode
|
2015-10-19 07:23:49 +00:00
|
|
|
end
|
|
|
|
end
|