From 18006ea9c811ad4b2ddb9fc43ec05686d4c82d94 Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Fri, 12 Jul 2019 10:12:53 +0100 Subject: [PATCH] Change devise config to speed up password encryption in tests --- config/initializers/devise.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index b2424cdbbd..6f0a508ac4 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -37,7 +37,7 @@ Devise.setup do |config| # ==> Configuration for :database_authenticatable # For bcrypt, this is the cost for hashing the password and defaults to 10. If # using other encryptors, it sets how many times you want the password re-encrypted. - config.stretches = 20 + config.stretches = Rails.env.test? ? 1 : 20 # Setup a pepper to generate the encrypted password. config.pepper = Rails.configuration.secret_token