mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 14:58:05 -05:00
Creating stretches to force encrypting password as many times as possible.
This commit is contained in:
@@ -92,8 +92,9 @@ class AuthenticableTest < ActiveSupport::TestCase
|
||||
|
||||
test 'should encrypt password using a sha1 hash' do
|
||||
Devise::Authenticable.pepper = 'pepper'
|
||||
Devise::Authenticable.stretches = 1
|
||||
user = create_user
|
||||
expected_password = ::Digest::SHA1.hexdigest("--#{user.password_salt}--pepper--123456--")
|
||||
expected_password = ::Digest::SHA1.hexdigest("--#{user.password_salt}--pepper--123456--pepper--")
|
||||
assert_equal expected_password, user.encrypted_password
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user