Guest User

Untitled

a guest
Jul 22nd, 2018
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. factory :user do
  2. full_name "Mr Test"
  3. email { "test@example.com" }
  4. password "secret"
  5. salt "asdasdastr4325234324sdfds"
  6. activation_state "active"
  7.  
  8. after_build do |u|
  9. u.crypted_password = Sorcery::CryptoProviders::BCrypt.encrypt(u.password, u.salt)
  10. end
  11. end
Add Comment
Please, Sign In to add comment