metamaps--metamaps/spec/factories/users.rb
2015-12-16 22:19:58 +08:00

11 lines
334 B
Ruby

FactoryGirl.define do
factory :user do
name { random_string(10) }
email { random_string(10) + '@' + random_string(10) + '.com' }
code { random_string(8) }
joinedwithcode { code }
password 'omgwtfbbq'
to_create { |instance| instance.save(validate: false) } # bypass validation of the joinedwithcode
end
end