metamaps--metamaps/spec/factories/users.rb

15 lines
381 B
Ruby

FactoryGirl.define do
factory :user do
sequence(:name) { |n| "Cool User ##{n}" }
sequence(:email) { |n| "cooluser#{n}@cooldomain.com" }
joinedwithcode { "qwertyui" }
password 'omgwtfbbq'
transient do
validate false
end
# bypass validation of the joinedwithcode
to_create { |instance| instance.save(validate: instance.validate) }
end
end