creates user without email nor username

This commit is contained in:
rgarcia
2016-12-26 12:45:48 +01:00
parent b8e175d306
commit c1b06b6501

View File

@@ -51,12 +51,14 @@ class Signature < ActiveRecord::Base
created_from_signature: true, created_from_signature: true,
verified_at: Time.now, verified_at: Time.now,
erased_at: Time.now, erased_at: Time.now,
email: "#{document_number}@inexistent.dev", password: random_password
password: "12345678",
username: document_number,
terms_of_service: '1' terms_of_service: '1'
} }
User.create(user_params) User.create!(user_params)
end
def random_password
(0...20).map { ('a'..'z').to_a[rand(26)] }.join
end end
def in_census? def in_census?