mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
- Maximum attempts changed from 5 to 20
- Lockable is not turned on by default - Fixed lockable incompatibilities with latest commits
This commit is contained in:
@@ -4,7 +4,7 @@ class UnlockInstructionsTest < ActionMailer::TestCase
|
||||
|
||||
def setup
|
||||
setup_mailer
|
||||
DeviseMailer.sender = 'test@example.com'
|
||||
Devise.mailer_sender = 'test@example.com'
|
||||
end
|
||||
|
||||
def user
|
||||
|
||||
@@ -98,7 +98,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
|
||||
|
||||
test 'add all modules' do
|
||||
assert_include_modules Devisable,
|
||||
:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :lockable
|
||||
:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
|
||||
end
|
||||
|
||||
test 'configure modules with except option' do
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class User < ActiveRecord::Base
|
||||
devise :all, :timeoutable
|
||||
devise :all, :timeoutable, :lockable
|
||||
attr_accessible :username, :email, :password, :password_confirmation
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ Devise.setup do |config|
|
||||
# Remember that Devise includes other modules on its own (like :activatable
|
||||
# and :timeoutable) which are not included here and also plugins. So be sure
|
||||
# to check the docs for a complete set.
|
||||
config.all = [:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :lockable]
|
||||
config.all = [:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable]
|
||||
|
||||
# Invoke `rake secret` and use the printed value to setup a pepper to generate
|
||||
# the encrypted password. By default no pepper is used.
|
||||
@@ -55,7 +55,7 @@ Devise.setup do |config|
|
||||
# config.scoped_views = true
|
||||
|
||||
# Number of authentication tries before locking an account.
|
||||
# config.maximum_attempts = 5
|
||||
# config.maximum_attempts = 20
|
||||
|
||||
# Defines which strategy will be used to unlock an account.
|
||||
# :email = Sends an unlock link to the user email
|
||||
|
||||
Reference in New Issue
Block a user